Added vim to lsp global variables in order to remove warnings
This commit is contained in:
@@ -8,6 +8,28 @@ lsp.ensure_installed({
|
||||
'jedi_language_server', -- Python
|
||||
})
|
||||
|
||||
-- Fix undefined global 'vim'
|
||||
lsp.configure('lua_ls', {
|
||||
cmd = { 'lua-language-server' },
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
path = vim.split(package.path, ';'),
|
||||
},
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
|
||||
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
lsp.default_keymaps({buffer = bufnr})
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user