Fix supported feature check

This commit is contained in:
ViViDboarder 2022-01-10 10:46:53 -08:00
parent 44b7b000df
commit 6d2acddc56
1 changed files with 5 additions and 6 deletions

View File

@ -53,14 +53,13 @@ local function default_attach(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, ...) vim.api.nvim_buf_set_option(bufnr, ...)
end end
-- Set built in features to use lsp functions
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
if client.resolved_capabilities.goto_definition then
if resolved_capabilities.goto_definition then buf_set_option("tagfunc", "v:lua.vim.lsp.tagfunc")
buf_set_option(bufnr, "tagfunc", "v:lua.vim.lsp.tagfunc")
end end
if client.resolved_capabilities.document_formatting then
if resolved_capabilities.document_formatting then buf_set_option("formatexpr", "v:lua.vim.lsp.formatexpr()")
buf_set_option(bufnr, "formatexpr", "v:lua.vim.lsp.formatexpr()")
end end
-- Mappings -- Mappings