aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authordelphinus <me@delphinus.dev>2021-01-20 13:59:42 +0900
committerdelphinus <me@delphinus.dev>2021-01-20 14:01:23 +0900
commit6076721c2cbe17b67d8cedc4f0b5694c35bca16f (patch)
tree6b31acbdf69ad4b72c5f8884fec897d35991c939 /README.md
parentMerge pull request #678 from mjlbach/pyright_update_root (diff)
downloadnvim-lspconfig-6076721c2cbe17b67d8cedc4f0b5694c35bca16f.tar
nvim-lspconfig-6076721c2cbe17b67d8cedc4f0b5694c35bca16f.tar.gz
nvim-lspconfig-6076721c2cbe17b67d8cedc4f0b5694c35bca16f.tar.bz2
nvim-lspconfig-6076721c2cbe17b67d8cedc4f0b5694c35bca16f.tar.lz
nvim-lspconfig-6076721c2cbe17b67d8cedc4f0b5694c35bca16f.tar.xz
nvim-lspconfig-6076721c2cbe17b67d8cedc4f0b5694c35bca16f.tar.zst
nvim-lspconfig-6076721c2cbe17b67d8cedc4f0b5694c35bca16f.zip
Use nvim_exec to execute multiline commands
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index c41de974..4d1210f0 100644
--- a/README.md
+++ b/README.md
@@ -174,19 +174,19 @@ local on_attach = function(client, bufnr)
elseif client.resolved_capabilities.document_range_formatting then
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
end
-
+
-- Set autocommands conditional on server_capabilities
if client.resolved_capabilities.document_highlight then
- require('lspconfig').util.nvim_multiline_command [[
- :hi LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow
- :hi LspReferenceText cterm=bold ctermbg=red guibg=LightYellow
- :hi LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow
+ vim.api.nvim_exec([[
+ hi LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow
+ hi LspReferenceText cterm=bold ctermbg=red guibg=LightYellow
+ hi LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow
augroup lsp_document_highlight
autocmd!
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END
- ]]
+ ]], false)
end
end