-
I open an empty buffer and R.nvim plugin is already loaded. However plugins for other programming languages are not loaded if you are not working with them. Could you advise why we need to eager load R.nvim? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 2 replies
-
Because it is a filetype plugin which means that it always was lazy loaded
(since 2009, long before Neovim existed). The lazy feature is useful for
general plugins.
|
Beta Was this translation helpful? Give feedback.
-
As far as I know,
Please, do a pull request for this. If it improves What is Neovim's startup time when editing a non-R filetype with What is Neovim's startup time when editing an R filetype with You can use the command |
Beta Was this translation helpful? Give feedback.
-
On my system, either opening a plain text without file extension or an R script,
But note that the command
The slowest config operation is to run the |
Beta Was this translation helpful? Give feedback.
-
This is where I thought it is eager loaded, I'll take a close look, Thanks! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the details. I'll take a look if I can set lazy=true(which is the default). I am very new to lua and the plugin system though. I use the Lazyvim distribution. to just start neovim, with R.nvim total startup time is 84ms, without R.nvim is 57ms. without
with
|
Beta Was this translation helpful? Give feedback.
-
with R.nvim installed it is 72ms, without R.nvim installed it is 71ms, so no significant difference. with
without
|
Beta Was this translation helpful? Give feedback.
-
The increase from 57 ms to 84 ms in your system seems to be due to
and I can't find I added the creation of a temporary global variable to |
Beta Was this translation helpful? Give feedback.
-
In Anyway, note that |
Beta Was this translation helpful? Give feedback.
On my system, either opening a plain text without file extension or an R script,
:Lazy profile
reports the same result (about 3 ms):But note that the command
:RDebugInfo
is not available after starting Neovim editing a non-R file which means that theR.nvim
setup function was not run. This is what I mean when I say that filetype plugins are natively lazy-loaded. With an R file type,:RDebugInfo
outputs:The slowest config operation is to run the
befo…