diff options
author | Gregory Anders <greg@gpanders.com> | 2021-11-29 20:31:19 -0700 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2021-11-30 09:03:41 +0100 |
commit | b6e531c1d90da143d4351442baee8fef0479a6f7 (patch) | |
tree | 22560e5c2bdf16240104901cbcdaccc939a53391 /runtime/lua/vim/lsp | |
parent | bc1d13bb368298988e87983307e6d92f20441f56 (diff) | |
download | rneovim-b6e531c1d90da143d4351442baee8fef0479a6f7.tar.gz rneovim-b6e531c1d90da143d4351442baee8fef0479a6f7.tar.bz2 rneovim-b6e531c1d90da143d4351442baee8fef0479a6f7.zip |
docs(lsp): add annotations for private functions
Diffstat (limited to 'runtime/lua/vim/lsp')
-rw-r--r-- | runtime/lua/vim/lsp/buf.lua | 1 | ||||
-rw-r--r-- | runtime/lua/vim/lsp/log.lua | 1 | ||||
-rw-r--r-- | runtime/lua/vim/lsp/sync.lua | 1 | ||||
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 6 |
4 files changed, 7 insertions, 2 deletions
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) diff --git a/runtime/lua/vim/lsp/log.lua b/runtime/lua/vim/lsp/log.lua index 4597f1919a..dbc473b52c 100644 --- a/runtime/lua/vim/lsp/log.lua +++ b/runtime/lua/vim/lsp/log.lua @@ -101,6 +101,7 @@ function log.set_level(level) end --- Gets the current log level. +---@return string current log level function log.get_level() return current_log_level end diff --git a/runtime/lua/vim/lsp/sync.lua b/runtime/lua/vim/lsp/sync.lua index f29c0a3f38..5df2a4d144 100644 --- a/runtime/lua/vim/lsp/sync.lua +++ b/runtime/lua/vim/lsp/sync.lua @@ -74,6 +74,7 @@ local function byte_to_utf(line, byte, offset_encoding) return utf_idx + 1 end +---@private local function compute_line_length(line, offset_encoding) local length local _ diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 2879c4a565..e9155a7231 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -158,6 +158,7 @@ end local function get_lines(bufnr, rows) rows = type(rows) == "table" and rows or { rows } + ---@private local function buf_lines() local lines = {} for _, row in pairs(rows) do @@ -262,6 +263,7 @@ local function get_line_byte_from_position(bufnr, position, offset_encoding) end --- Process and return progress reports from lsp server +---@private function M.get_progress_messages() local new_messages = {} @@ -657,7 +659,7 @@ function M.rename(old_fname, new_fname, opts) api.nvim_buf_delete(oldbuf, { force = true }) end - +---@private local function create_file(change) local opts = change.options or {} -- from spec: Overwrite wins over `ignoreIfExists` @@ -669,7 +671,7 @@ local function create_file(change) vim.fn.bufadd(fname) end - +---@private local function delete_file(change) local opts = change.options or {} local fname = vim.uri_to_fname(change.uri) |