feat(lsp): force install less servers
This commit is contained in:
parent
8b89755f5e
commit
32cafa4d86
4 changed files with 9 additions and 29 deletions
|
@ -14,18 +14,18 @@ local default_config = {
|
||||||
-- vim.diagnostic.config settiings
|
-- vim.diagnostic.config settiings
|
||||||
servers = {
|
servers = {
|
||||||
-- enable/disable server + formatting
|
-- enable/disable server + formatting
|
||||||
-- rust_analyzer = true, -- enable non-default servers
|
-- enable non-default servers
|
||||||
|
-- rust_analyzer = true,
|
||||||
|
|
||||||
-- or override lsp server options
|
-- or override lsp server options
|
||||||
--[[
|
--[[ rust_analyzer = {
|
||||||
rust_analyzer = {
|
|
||||||
opts = {}
|
opts = {}
|
||||||
},
|
}, ]]
|
||||||
]]
|
|
||||||
|
|
||||||
sumneko_lua = {
|
sumneko_lua = {
|
||||||
format = false, -- disable formatting all together
|
format = false, -- disable formatting all together
|
||||||
},
|
},
|
||||||
|
html = true,
|
||||||
tsserver = {
|
tsserver = {
|
||||||
format = false, -- disable formatting all together
|
format = false, -- disable formatting all together
|
||||||
},
|
},
|
||||||
|
|
|
@ -36,28 +36,12 @@ function M.on_attach(client, bufnr)
|
||||||
client.resolved_capabilities.document_formatting = false
|
client.resolved_capabilities.document_formatting = false
|
||||||
client.resolved_capabilities.document_range_formatting = false
|
client.resolved_capabilities.document_range_formatting = false
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ require('lsp_signature').on_attach({
|
|
||||||
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
|
||||||
handler_opts = {
|
|
||||||
border = 'single',
|
|
||||||
},
|
|
||||||
}, bufnr) ]]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
M.flags = {
|
M.flags = {
|
||||||
debounce_text_changes = 150,
|
debounce_text_changes = 150,
|
||||||
}
|
}
|
||||||
|
|
||||||
--[[ local function get_capabilities()
|
|
||||||
local ok, cmp_nvim_lsp = pcall(require, 'cmp_nvim_lsp')
|
|
||||||
if not ok then
|
|
||||||
return {}
|
|
||||||
end
|
|
||||||
return cmp_nvim_lsp.update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
||||||
end
|
|
||||||
|
|
||||||
M.capabilities = get_capabilities() ]]
|
|
||||||
M.capabilities = {}
|
M.capabilities = {}
|
||||||
|
|
||||||
M.root_dir = function(fname)
|
M.root_dir = function(fname)
|
||||||
|
|
|
@ -17,14 +17,9 @@ lsp_installer.settings({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- initial default serverse
|
-- initial default servers
|
||||||
local requested_servers = {
|
-- by default tsserver/ts_utils and null_ls are enabled
|
||||||
'tsserver',
|
local requested_servers = {}
|
||||||
'sumneko_lua',
|
|
||||||
'jsonls',
|
|
||||||
'cssls',
|
|
||||||
'html',
|
|
||||||
}
|
|
||||||
|
|
||||||
-- get disabled servers from config
|
-- get disabled servers from config
|
||||||
local disabled_servers = {}
|
local disabled_servers = {}
|
||||||
|
|
|
@ -17,6 +17,7 @@ null_ls.config(vim.tbl_deep_extend('force', {
|
||||||
'-',
|
'-',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
null_ls.builtins.formatting.stylelint,
|
||||||
null_ls.builtins.code_actions.gitsigns,
|
null_ls.builtins.code_actions.gitsigns,
|
||||||
},
|
},
|
||||||
}, config.lsp.servers.null_ls or {}))
|
}, config.lsp.servers.null_ls or {}))
|
||||||
|
|
Loading…
Add table
Reference in a new issue