mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-11-17 17:26:27 +00:00
use lsp for tags and formatting when available
This commit is contained in:
parent
5b56491ea7
commit
4c6c3041f0
@ -55,6 +55,14 @@ local function default_attach(client, bufnr)
|
||||
|
||||
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||
|
||||
if resolved_capabilities.goto_definition then
|
||||
buf_set_option(bufnr, "tagfunc", "v:lua.vim.lsp.tagfunc")
|
||||
end
|
||||
|
||||
if resolved_capabilities.document_formatting then
|
||||
buf_set_option(bufnr, "formatexpr", "v:lua.vim.lsp.formatexpr()")
|
||||
end
|
||||
|
||||
-- Mappings
|
||||
-- TODO: Maybe prefix all of these for easier discovery
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
Loading…
Reference in New Issue
Block a user