Update lua config
This commit is contained in:
parent
7718d83855
commit
f4f67935d6
@ -1,4 +0,0 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||
"Lua.workspace.checkThirdParty": false
|
||||
}
|
22
lua/lsp.lua
22
lua/lsp.lua
@ -21,13 +21,27 @@ if vim.fn.executable('typescript-language-server') then
|
||||
nvim_lspconfig.tsserver.setup({capabilities = capabilities})
|
||||
end
|
||||
if vim.fn.executable('lua-language-server') then
|
||||
local runtime_path = vim.split(package.path, ';')
|
||||
table.insert(runtime_path, 'lua/?.lua')
|
||||
table.insert(runtime_path, 'lua/?/init.lua')
|
||||
|
||||
nvim_lspconfig.sumneko_lua.setup({
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {globals = {'vim'}},
|
||||
runtime = {version = 'LuaJIT'},
|
||||
telemetry = {enable = false},
|
||||
workspace = {library = vim.api.nvim_get_runtime_file('', true)},
|
||||
diagnostics = {
|
||||
globals = {'vim'},
|
||||
},
|
||||
runtime = {
|
||||
path = runtime_path,
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = vim.api.nvim_get_runtime_file('', true),
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user