docs(lsp): add annotations for private functions

This commit is contained in:
Gregory Anders
2021-11-29 20:31:19 -07:00
committed by Dundar Göc
parent bc1d13bb36
commit b6e531c1d9
9 changed files with 43 additions and 52 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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 _

View File

@@ -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)