vim.lsp.sync
Methods1
function M.compute_diff(prev_lines: table, curr_lines: table, firstline: integer, lastline: integer, new_lastline: integer, position_encoding: "utf-8" | "utf-16" | "utf-32", line_ending: string) -> lsp.TextDocumentContentChangeEvent
Returns the range table for the difference between prev and curr lines
Parameters
prev_linestablelist of lines
curr_linestablelist of lines
firstlineintegerline to begin search for first difference
lastlineintegerline to begin search in old_lines for last difference
new_lastlineintegerline to begin search in new_lines for last difference
position_encoding"utf-8" | "utf-16" | "utf-32"encoding requested by language server
line_endingstring
Returns
- lsp.TextDocumentContentChangeEvent
: see https://microsoft.github.io/language-server-protocol/specification/#textDocumentContentChangeEvent