vim: make lua_ls work with neovim
This commit is contained in:
parent
90d7f05e4b
commit
c53a9014b9
1 changed files with 21 additions and 2 deletions
|
@ -41,8 +41,27 @@ local config = function()
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- server-specific handlers
|
lua_ls = function()
|
||||||
-- ['server'] = function() --[[ server-specific stuff... ]] end
|
require'lspconfig'.lua_ls.setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
-- I'm using lua only inside neovim, so the runtime is LuaJIT.
|
||||||
|
runtime = { version = 'LuaJIT' },
|
||||||
|
|
||||||
|
-- Get the language server to recognize the `vim` global.
|
||||||
|
diagnostics = { globals = {'vim'} },
|
||||||
|
|
||||||
|
-- Make the server aware of Neovim runtime files.
|
||||||
|
workspace = { library = vim.api.nvim_get_runtime_file("", true) },
|
||||||
|
|
||||||
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
|
telemetry = { enable = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue