Description
Did you check docs and existing issues?
- I have read all the LazyVim docs
- I have updated the plugin to the latest version before submitting this issue
- I have searched the existing issues of LazyVim
- I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
v0.10.4
Operating system/version
OSX 15.3
Describe the bug
I believe the documentation may be incorrect on the examples page. Specifically the line:
{ import = "lazyvim.plugins.extras.lang.typescript" },
I am new to lazyvim, and I was following the examples provided and I tried importing the extras as outlined on this page. However I got a dialog box with a warning about the imports being in the wrong order and that the lazyvim extras should be imported before other plugins. I am relatively inexperienced with nvim, so my guess at the cause of the issue is:
- files in
plugins/*.lua
get loaded after the all the lazyvim plugins - these files contain an import of the typescript extra lang plugin, as suggested by the documentation, which may or may not come after 3rd party plugins
- this raises the warning about import order
- moving the import statement instead to before this line fixes the issue. Because this comes before the import of any 3rd party libraries.
I've tried searching through the issues, but couldn't find anyone else reporting something similar
Steps To Reproduce
- Create a lua file in
plugins
using the starter config cloned from github - Add an import any 3rd party plugin
- Following the documentation then import a lazyvim extra plugin after a 3rd party plugin
Expected Behavior
I think the expected behaviour is the docs suggest adding the lazy vim extra imports to before L22 of lazy.lua instead. But I am just making a guess here since I am not familiar with writing nvim plugins.
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- add any other plugins here
},
})