aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
authorGregory Anders <greg@gpanders.com>2021-11-29 22:13:31 -0700
committerDundar Göc <gocdundar@gmail.com>2021-11-30 09:03:41 +0100
commitd0fbbea62ae35928efcabb224932bb990d7cab29 (patch)
tree9e072452a50a132142cd54a57dc50a12ef9fad1f /runtime/lua
parent5a24c2c83d76432e38f40d31db4c0a8fdd4232cf (diff)
downloadrneovim-d0fbbea62ae35928efcabb224932bb990d7cab29.tar.gz
rneovim-d0fbbea62ae35928efcabb224932bb990d7cab29.tar.bz2
rneovim-d0fbbea62ae35928efcabb224932bb990d7cab29.zip
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.
Diffstat (limited to 'runtime/lua')
-rw-r--r--runtime/lua/vim/lsp/buf.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua
index d42f5b6cf8..f02ebfb9dc 100644
--- a/runtime/lua/vim/lsp/buf.lua
+++ b/runtime/lua/vim/lsp/buf.lua
@@ -165,7 +165,7 @@ end
--- saved. {timeout_ms} is passed on to |vim.lsp.buf_request_sync()|. Example:
---
--- <pre>
---- vim.api.nvim_command[[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()]]
+--- autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()
--- </pre>
---
---@param options Table with valid `FormattingOptions` entries
@@ -447,9 +447,9 @@ end
--- by events such as `CursorHold`, eg:
---
--- <pre>
---- vim.api.nvim_command [[autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()]]
---- vim.api.nvim_command [[autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()]]
---- vim.api.nvim_command [[autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()]]
+--- autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
+--- autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()
+--- autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
--- </pre>
---
--- Note: Usage of |vim.lsp.buf.document_highlight()| requires the following highlight groups