From b6e531c1d90da143d4351442baee8fef0479a6f7 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Mon, 29 Nov 2021 20:31:19 -0700 Subject: docs(lsp): add annotations for private functions --- runtime/lua/vim/lsp/buf.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/lua/vim/lsp/buf.lua') diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index be9bd9d223..d42f5b6cf8 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -263,6 +263,7 @@ function M.rename(new_name) request('textDocument/rename', params) end + ---@private local function prepare_rename(err, result) if err == nil and result == nil then vim.notify('nothing to rename', vim.log.levels.INFO) -- cgit 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/lua/vim/lsp/buf.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/lua/vim/lsp/buf.lua') 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: --- ---
---- vim.api.nvim_command[[autocmd BufWritePre  lua vim.lsp.buf.formatting_sync()]]
+--- autocmd BufWritePre  lua vim.lsp.buf.formatting_sync()
 --- 
--- ---@param options Table with valid `FormattingOptions` entries @@ -447,9 +447,9 @@ end --- 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 following highlight groups -- cgit