aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Lithammer <peter.lithammer@gmail.com>2021-02-12 08:38:50 +0100
committerPeter Lithammer <peter.lithammer@gmail.com>2021-02-12 08:38:50 +0100
commitb6c01d89949f765fdc80c2e876d5d17aa674790d (patch)
tree42fd85894d3dafca821c03c64051d3873765de04
parentMerge pull request #722 from halkn/fix-readmne (diff)
downloadnvim-lspconfig-b6c01d89949f765fdc80c2e876d5d17aa674790d.tar
nvim-lspconfig-b6c01d89949f765fdc80c2e876d5d17aa674790d.tar.gz
nvim-lspconfig-b6c01d89949f765fdc80c2e876d5d17aa674790d.tar.bz2
nvim-lspconfig-b6c01d89949f765fdc80c2e876d5d17aa674790d.tar.lz
nvim-lspconfig-b6c01d89949f765fdc80c2e876d5d17aa674790d.tar.xz
nvim-lspconfig-b6c01d89949f765fdc80c2e876d5d17aa674790d.tar.zst
nvim-lspconfig-b6c01d89949f765fdc80c2e876d5d17aa674790d.zip
readme: Fix lsp_document_highlight augroup to work for buffers
Without this the `augroup` will be removed from old buffers when a new language server is attached.
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index 1f1a24b7..746a9c95 100644
--- a/README.md
+++ b/README.md
@@ -185,7 +185,7 @@ local on_attach = function(client, bufnr)
hi LspReferenceText cterm=bold ctermbg=red guibg=LightYellow
hi LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow
augroup lsp_document_highlight
- autocmd!
+ autocmd! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END