nvim: lua: lsp: Add support for incremental sync
Support for incremental sync landed in neovim with this MR. https://github.com/neovim/neovim/pull/13371
This commit is contained in:
parent
ab59251f2e
commit
eb8346e80f
1 changed files with 4 additions and 0 deletions
|
@ -49,6 +49,10 @@ local on_attach = function(client, bufnr)
|
||||||
completion.on_attach(client, bufnr)
|
completion.on_attach(client, bufnr)
|
||||||
lsp_status.on_attach(client, bufnr)
|
lsp_status.on_attach(client, bufnr)
|
||||||
|
|
||||||
|
if client.config.flags then
|
||||||
|
client.config.flags.allow_incremental_sync = true
|
||||||
|
end
|
||||||
|
|
||||||
local opts = { noremap=true, silent=true }
|
local opts = { noremap=true, silent=true }
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||||
|
|
Loading…
Reference in a new issue