-
Notifications
You must be signed in to change notification settings - Fork 28k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined global vim
#228
Comments
You can configure the lsp to recognize 'vim' as a global var. Something like this: local servers = {
lua_ls = {
Lua = {
diagnostics = {
globals = { "vim", "describe", "it", "before_each", "after_each", "packer_plugins", "MiniTest" },
},
},
},
} |
Would that add it my documentation when I press |
Are you folks still seeing this problem with the latest kickstart.nvim ? |
I don't see any changes in the upstream that would effect this issue but I will check |
Thanks for confirming. OK, I think what I'm going to do is spin up a VM so I can test the stock config without fear of cross contamination with my existing customized version. I'll do that and see if I can reproduce. |
Hi there! Would you please consider upgrading to Neovim 0.9.0 ? I can't reproduce with a stock kickstart.nvim and an updated Neovim. |
Wierd, I have neovim 0.9.x and this is still a problem do you have the lua language server installed with mason |
Nope. Can you please give me the exact module to install with :MasonInstall? Please add that to Steps to Reproduce above. Thanks! |
It is called |
Ah, no, you're right. My bad. Running :Mason shows me the list of installed lsps and lua_language_server is in fact installed. I wonder what's different about our respective configurations? You're using the latest files from kickstart.nvim right? |
Yep using latest |
Seems like you're not the first to hit this, see this issue over on the lua-language-server repo. Also seems from that bug description like it's intermittent and hard to pin down which makes it damnably annoying to try to reproduce. Have you tried the proposed fix @girishji mentioned above? Please give that a whirl and let us know. Not sure what else to do with this otherwise. |
No response for a week. I'm closing this for now. |
Describe the bug
When I open my
init.lua
I get errors saying undefined globalvim
this is quite annoying.Also I would like to have documentation for the vim commands (such as
vim.api.nvim_echo
) for developing plugins in my editor if that is possible instead of just removing the warning.To Reproduce
Use the default config and open
init.lua
then runMasonInstall lua-language-server
Desktop (please complete the following information):
** Neovim Version **
The text was updated successfully, but these errors were encountered: