aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/sync.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-07-18 15:42:30 +0100
committerGitHub <noreply@github.com>2023-07-18 15:42:30 +0100
commitbe74807eef13ff8c90d55cf8b22b01d6d33b1641 (patch)
tree9f7e1cebdb2677057b066df9fea91bce86b4ab6a /runtime/lua/vim/lsp/sync.lua
parentd0ae529861594b2e89a436ed2cfb3d2243f8bfcc (diff)
downloadrneovim-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/sync.lua')
-rw-r--r--runtime/lua/vim/lsp/sync.lua7
1 files changed, 0 insertions, 7 deletions
diff --git a/runtime/lua/vim/lsp/sync.lua b/runtime/lua/vim/lsp/sync.lua
index 350c096b47..9c1bbf3892 100644
--- a/runtime/lua/vim/lsp/sync.lua
+++ b/runtime/lua/vim/lsp/sync.lua
@@ -48,7 +48,6 @@ local str_utfindex = vim.str_utfindex
local str_utf_start = vim.str_utf_start
local str_utf_end = vim.str_utf_end
----@private
-- Given a line, byte idx, and offset_encoding convert to the
-- utf-8, utf-16, or utf-32 index.
---@param line string the line to index into
@@ -74,7 +73,6 @@ 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 _
@@ -88,7 +86,6 @@ local function compute_line_length(line, offset_encoding)
return length
end
----@private
-- Given a line, byte idx, alignment, and offset_encoding convert to the aligned
-- utf-8 index and either the utf-16, or utf-32 index.
---@param line string the line to index into
@@ -122,7 +119,6 @@ local function align_end_position(line, byte, offset_encoding)
return byte, char
end
----@private
--- Finds the first line, byte, and char index of the difference between the previous and current lines buffer normalized to the previous codepoint.
---@param prev_lines table list of lines from previous buffer
---@param curr_lines table list of lines from current buffer
@@ -198,7 +194,6 @@ local function compute_start_range(
return { line_idx = firstline, byte_idx = byte_idx, char_idx = char_idx }
end
----@private
--- Finds the last line and byte index of the differences between prev and current buffer.
--- Normalized to the next codepoint.
--- prev_end_range is the text range sent to the server representing the changed region.
@@ -307,7 +302,6 @@ local function compute_end_range(
return prev_end_range, curr_end_range
end
----@private
--- Get the text of the range defined by start and end line/column
---@param lines table list of lines
---@param start_range table table returned by first_difference
@@ -343,7 +337,6 @@ local function extract_text(lines, start_range, end_range, line_ending)
end
end
----@private
-- rangelength depends on the offset encoding
-- bytes for utf-8 (clangd with extension)
-- codepoints for utf-16