From d0fbbea62ae35928efcabb224932bb990d7cab29 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Mon, 29 Nov 2021 22:13:31 -0700 Subject: docs(lsp): do not use nvim_command for Vimscript examples The examples are relevant and applicable for both Lua and Vimscript configurations and the `vim.api.nvim_command` prefixes just add noise that doesn't contribute to the example. --- runtime/doc/lsp.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index a9669e9e01..e71b869413 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -991,9 +991,9 @@ document_highlight() *vim.lsp.buf.document_highlight()* triggered by a key mapping or by events such as `CursorHold` , eg: > - vim.api.nvim_command [[autocmd CursorHold lua vim.lsp.buf.document_highlight()]] - vim.api.nvim_command [[autocmd CursorHoldI lua vim.lsp.buf.document_highlight()]] - vim.api.nvim_command [[autocmd CursorMoved lua vim.lsp.buf.clear_references()]] + autocmd CursorHold lua vim.lsp.buf.document_highlight() + autocmd CursorHoldI lua vim.lsp.buf.document_highlight() + autocmd CursorMoved lua vim.lsp.buf.clear_references() < Note: Usage of |vim.lsp.buf.document_highlight()| requires the @@ -1061,7 +1061,7 @@ formatting_sync({options}, {timeout_ms}) |vim.lsp.buf_request_sync()|. Example: > - vim.api.nvim_command[[autocmd BufWritePre lua vim.lsp.buf.formatting_sync()]] + autocmd BufWritePre lua vim.lsp.buf.formatting_sync() < Parameters: ~ -- cgit