Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Aug 10, 2024
1 parent dc94c16 commit 1034399
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions lua/modules/lsp/backend.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,30 @@ lspconfig.gopls.setup({
})

lspconfig.lua_ls.setup({
on_attach = M._attach,
capabilities = M.capabilities,
settings = {
Lua = {
diagnostics = {
unusedLocalExclude = { '_*' },
globals = { 'vim' },
disable = {
'luadoc-miss-see-name',
'undefined-field',
},
},
on_init = function(client)
local path = client.workspace_folders[1].name
if vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc') then
return
end

client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
runtime = {
version = 'LuaJIT',
-- path = vim.split(package.path, ';'),
},
completion = {
callSnippet = 'Replace',
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME .. '/lua',
'${3rd}/busted/library',
vim.env.VIMRUNTIME,
'${3rd}/luv/library',
},
checkThirdParty = 'Disable',
},
completion = {
callSnippet = 'Replace',
},
},
})
end,
settings = {
Lua = {},
},
})

Expand Down

0 comments on commit 1034399

Please sign in to comment.