aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-07-29 00:09:42 +0800
committerjdhao <jdhao@hotmail.com>2021-07-29 00:09:42 +0800
commit84680878a24ea87ecf1f969e8cf93f9bdc1aba79 (patch)
treef08ee6e84900509bb58e0125391702522fde9ea1 /lua
parent3cdb08c5f1f2bc21b5e478f1b9acef639eb1a1ca (diff)
use vim.cmd instead of vim.api.nvim_exec
Diffstat (limited to 'lua')
-rw-r--r--lua/config/lsp.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua
index 405980c..c0d18d8 100644
--- a/lua/config/lsp.lua
+++ b/lua/config/lsp.lua
@@ -36,7 +36,7 @@ local on_attach = function(client, bufnr)
-- The blow command will highlight the current variable and its usages in the buffer.
if client.resolved_capabilities.document_highlight then
- vim.api.nvim_exec([[
+ vim.cmd([[
hi link LspReferenceRead Visual
hi link LspReferenceText Visual
hi link LspReferenceWrite Visual
@@ -45,7 +45,7 @@ local on_attach = function(client, bufnr)
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END
- ]], false)
+ ]])
end
local msg = string.format('Language server %s started!' , client.name)