Skip to content

Commit

Permalink
nvim: fix huge issue with nvim-lspconfig not creating commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlucthumm committed Jul 22, 2023
1 parent b6c0845 commit d01a337
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .config/nvim/lua/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ function M.on_attach(client, bufnr)
-- Capability specific commands
if client.server_capabilities.documentHighlightProvider then
-- Highlight symbol in document on hover. Delay is controlled by |updatetime|
api.nvim_exec2[[
augroup lsp_document_highlight
autocmd! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END
]]
api.nvim_create_autocmd({ 'CursorHold' }, {
command = 'lua vim.lsp.buf.document_highlight()',
buffer = bufnr,
})
api.nvim_create_autocmd({ 'CursorMoved' }, {
command = 'lua vim.lsp.buf.clear_references()',
buffer = bufnr,
})
end
if client.server_capabilities.codeLensProvider then
-- CodeLens provides extra actions like "Run Test"
Expand Down

0 comments on commit d01a337

Please sign in to comment.