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
|
||||
servers = {
|
||||
-- enable/disable server + formatting
|
||||
-- rust_analyzer = true, -- enable non-default servers
|
||||
-- enable non-default servers
|
||||
-- rust_analyzer = true,
|
||||
|
||||
-- or override lsp server options
|
||||
--[[
|
||||
rust_analyzer = {
|
||||
--[[ rust_analyzer = {
|
||||
opts = {}
|
||||
},
|
||||
]]
|
||||
}, ]]
|
||||
|
||||
sumneko_lua = {
|
||||
format = false, -- disable formatting all together
|
||||
},
|
||||
html = true,
|
||||
tsserver = {
|
||||
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_range_formatting = false
|
||||
end
|
||||
|
||||
--[[ require('lsp_signature').on_attach({
|
||||
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
||||
handler_opts = {
|
||||
border = 'single',
|
||||
},
|
||||
}, bufnr) ]]
|
||||
end
|
||||
|
||||
M.flags = {
|
||||
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.root_dir = function(fname)
|
||||
|
|
|
@ -17,14 +17,9 @@ lsp_installer.settings({
|
|||
},
|
||||
})
|
||||
|
||||
-- initial default serverse
|
||||
local requested_servers = {
|
||||
'tsserver',
|
||||
'sumneko_lua',
|
||||
'jsonls',
|
||||
'cssls',
|
||||
'html',
|
||||
}
|
||||
-- initial default servers
|
||||
-- by default tsserver/ts_utils and null_ls are enabled
|
||||
local requested_servers = {}
|
||||
|
||||
-- get disabled servers from config
|
||||
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,
|
||||
},
|
||||
}, config.lsp.servers.null_ls or {}))
|
||||
|
|
Loading…
Add table
Reference in a new issue