neovim-project
neovim-project copied to clipboard
No lazy loading support
Problem:
I'm in my project directory and opens nvim
for the first time (no previous session was saved). After exiting neovim, I'd expect `neovim-project' to not open any buffer (since no file was opened last time) the next time I type 'nvim', but instead, it opens an empty buffer
Reproduction
-
Delete previous session save via
:Telescope neovim-project history
2.Enternvim
from the terminal, from here, I have my startup dashboard show up like this: -
Exit neovim
-
Enter
nvim
again, from this, I'd expect to see my dashboard again, but instead, an empty buffer was opened, as in the picture:
Hmm, this issue only persists only when I set event = 'VeryLazy'
in lazy.nvim
. Could it somehow be fixed?
Hi, installation instruction contains priority=100, this option is mutually exclusive with lazy loading.
Please don't use event
and add lazy = false
if you have enabled lazy by default.
If you open nvim in the project directory (that matches the pattern) its expected behavior is to see an empty buffer or saved session. The only way to see your StartupPage is to open nvim outside the projects dir with option last_session_on_startup = false
The reason why it is done in this way: I believe that switching to the project directory in the terminal expresses the intention to work with this particular project. This is one of the possible ways to choose a project
If you want to bypass session loading and open Dashboard only, you can create some alias, for example:
alias vd="nvim -c Dashboard -- _"
add this to your .zshrc or .bashrc
and use vd
instead of nvim to open the Dashboard
Hi, installation instruction contains priority=100, this option is mutually exclusive with lazy loading. Please don't use
event
and addlazy = false
if you have enabled lazy by default.
Yes, but is there any way for the plugin to be lazy loaded?
Hmm, it seems that neovim-project
won't work correctly when lazy-loaded
Hmm, it seems that
neovim-project
won't work correctly when lazy-loaded
yes, that's right
Just discovered this wonderful plugin and I am loving it.
I was also wondering if it would be possible to have a dashboard (if it exists in one's config) being displayed. Is this feature queued for development, given that the issue has been open for a while now?
I was also wondering if it would be possible to have a dashboard (if it exists in one's config) being displayed.
this feature is not related to the opened issue. Yes, you can disable session auto loading in config and use your dashboard
last_session_on_startup = false
last_session_on_startup = false
Actually I can't use NVimTree if I don't set this to false. Worth to put this into README?
Update: even if I set it to false, I have to open NVimTree once, before opening any project from the history. Otherwise NVimTree will be broken.
last_session_on_startup = false
Actually I can't use NVimTree if I don't set this to false. Worth to put this into README?
Update: even if I set it to false, I have to open NVimTree once, before opening any project from the history. Otherwise NVimTree will be broken.
Worth to open an issue, not sure here or maybe in the NVimTree repo. NeoTree works fine for me, didn't test with NVimTree.
last_session_on_startup = false
Actually I can't use NVimTree if I don't set this to false. Worth to put this into README? Update: even if I set it to false, I have to open NVimTree once, before opening any project from the history. Otherwise NVimTree will be broken.
Worth to open an issue, not sure here or maybe in the NVimTree repo. NeoTree works fine for me, didn't test with NVimTree.
Thanks, I will use neotree, which is also a nice plugin :)
I don't want to hijack this thread, but I thought it's worth to share my finding about using NvimTree together with neovim-project:
You have to call nvim-tree's setup function explicitly in your neovim-project configuration:
init = function()
-- enable saving the state of plugins in the session
vim.opt.sessionoptions:append("globals") -- save global variables that start with an uppercase letter and contain at least one lowercase letter.
require("nvim-tree").setup {}
end,
Also had this issue, unclear why. Is the high priority loading of nvim-project preventing other plugins from loading for some reason?
Also had this issue, unclear why. Is the high priority loading of nvim-project preventing other plugins from loading for some reason?
I removed the priority setting and unfortunately it didn't help.
This also seems to break changing the nvim-tree root directory with cd.... @coffebar