diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-07-18 15:42:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-18 15:42:30 +0100 |
commit | be74807eef13ff8c90d55cf8b22b01d6d33b1641 (patch) | |
tree | 9f7e1cebdb2677057b066df9fea91bce86b4ab6a /runtime/lua/vim/lsp/buf.lua | |
parent | d0ae529861594b2e89a436ed2cfb3d2243f8bfcc (diff) | |
download | rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.tar.gz rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.tar.bz2 rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.zip |
docs(lua): more improvements (#24387)
* docs(lua): teach lua2dox how to table
* docs(lua): teach gen_vimdoc.py about local functions
No more need to mark local functions with @private
* docs(lua): mention @nodoc and @meta in dev-lua-doc
* fixup!
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
---------
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
-rw-r--r-- | runtime/lua/vim/lsp/buf.lua | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index 2140d3ae37..46f582dc7e 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -5,7 +5,6 @@ local npcall = vim.F.npcall local M = {} ----@private --- Sends an async request to all active clients attached to the current --- buffer. --- @@ -45,7 +44,6 @@ function M.hover() request('textDocument/hover', params) end ----@private local function request_with_options(name, params, options) local req_handler if options then @@ -120,7 +118,6 @@ function M.completion(context) return request('textDocument/completion', params) end ----@private ---@param bufnr integer ---@param mode "v"|"V" ---@return table {start={row,col}, end={row,col}} using (1, 0) indexing @@ -218,7 +215,6 @@ function M.format(options) vim.notify('[LSP] Format request failed, no matching language servers.') end - ---@private local function set_range(client, params) if range then local range_params = @@ -289,7 +285,6 @@ function M.rename(new_name, options) -- Compute early to account for cursor movements after going async local cword = vim.fn.expand('<cword>') - ---@private local function get_text_at_range(range, offset_encoding) return api.nvim_buf_get_text( bufnr, @@ -307,7 +302,6 @@ function M.rename(new_name, options) return end - ---@private local function rename(name) local params = util.make_position_params(win, client.offset_encoding) params.newName = name @@ -408,7 +402,6 @@ function M.document_symbol(options) request_with_options('textDocument/documentSymbol', params, options) end ----@private local function pick_call_hierarchy_item(call_hierarchy_items) if not call_hierarchy_items then return @@ -428,7 +421,6 @@ local function pick_call_hierarchy_item(call_hierarchy_items) return choice end ----@private local function call_hierarchy(method) local params = util.make_position_params() request('textDocument/prepareCallHierarchy', params, function(err, result, ctx) @@ -579,8 +571,6 @@ function M.clear_references() util.buf_clear_references() end ----@private --- --- This is not public because the main extension point is --- vim.ui.select which can be overridden independently. --- @@ -592,7 +582,6 @@ end local function on_code_action_results(results, ctx, options) local action_tuples = {} - ---@private local function action_filter(a) -- filter by specified action kind if options and options.context and options.context.only then @@ -632,7 +621,6 @@ local function on_code_action_results(results, ctx, options) return end - ---@private local function apply_action(action, client) if action.edit then util.apply_workspace_edit(action.edit, client.offset_encoding) @@ -643,7 +631,6 @@ local function on_code_action_results(results, ctx, options) end end - ---@private local function on_user_choice(action_tuple) if not action_tuple then return @@ -701,7 +688,6 @@ end --- Requests code actions from all clients and calls the handler exactly once --- with all aggregated results ----@private local function code_action_request(params, options) local bufnr = api.nvim_get_current_buf() local method = 'textDocument/codeAction' |