mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-30 22:59:22 +02:00
refactor capabilites function
This commit is contained in:
parent
f73da2a1b2
commit
ed71e50593
3 changed files with 30 additions and 31 deletions
|
@ -6,6 +6,11 @@ function lsp_config.config()
|
|||
require("lsp.handlers").setup()
|
||||
require("lsp.signs").setup()
|
||||
require("lsp.keybinds").setup()
|
||||
require("core.autocmds").define_augroups {
|
||||
_general_lsp = {
|
||||
{ "FileType", "lspinfo", "nnoremap <silent> <buffer> q :q<CR>" },
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
local function no_formatter_on_attach(client, bufnr)
|
||||
|
@ -16,25 +21,6 @@ local function no_formatter_on_attach(client, bufnr)
|
|||
client.resolved_capabilities.document_formatting = false
|
||||
end
|
||||
|
||||
function lsp_config.common_capabilities()
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
capabilities.textDocument.completion.completionItem.resolveSupport = {
|
||||
properties = {
|
||||
"documentation",
|
||||
"detail",
|
||||
"additionalTextEdits",
|
||||
},
|
||||
}
|
||||
return capabilities
|
||||
end
|
||||
|
||||
require("core.autocmds").define_augroups {
|
||||
_general_lsp = {
|
||||
{ "FileType", "lspinfo", "nnoremap <silent> <buffer> q :q<CR>" },
|
||||
},
|
||||
}
|
||||
|
||||
function lsp_config.setup(lang)
|
||||
local lang_server = lvim.lang[lang].lsp
|
||||
local provider = lang_server.provider
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue