Skip to content

possible to lazy load R.nvim? #132

Answered by jalvesaq
ssh352 asked this question in Q&A
May 9, 2024 · 8 comments · 2 replies
Discussion options

You must be logged in to vote

On my system, either opening a plain text without file extension or an R script, :Lazy profile reports the same result (about 3 ms):

        ★  start  R.nvim 3ms
          ‒  nvim-autopairs 2.53ms
          ‒  R.nvim/ftdetect/r.lua 0.11ms

But note that the command :RDebugInfo is not available after starting Neovim editing a non-R file which means that the R.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:

Time:
  before_rns.R (async): 0.130420534
  global setup: 0.003612362
  check health (async): 0.000355095
  unix setup: 8.504e-06

The slowest config operation is to run the befo…

Replies: 8 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ssh352
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ssh352
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ssh352
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants