docs: Add some references to LSP specification (#15321)

This commit is contained in:
max397574 2021-08-09 19:45:00 +02:00 committed by GitHub
parent cad5f01cf3
commit a3d5f391cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,6 +240,7 @@ end
--- Applies a list of text edits to a buffer. --- Applies a list of text edits to a buffer.
--@param text_edits (table) list of `TextEdit` objects --@param text_edits (table) list of `TextEdit` objects
--@param buf_nr (number) Buffer id --@param buf_nr (number) Buffer id
---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textEdit
function M.apply_text_edits(text_edits, bufnr) function M.apply_text_edits(text_edits, bufnr)
if not next(text_edits) then return end if not next(text_edits) then return end
if not api.nvim_buf_is_loaded(bufnr) then if not api.nvim_buf_is_loaded(bufnr) then
@ -1483,6 +1484,7 @@ do --[[ References ]]
--- ---
--@param bufnr buffer id --@param bufnr buffer id
--@param references List of `DocumentHighlight` objects to highlight --@param references List of `DocumentHighlight` objects to highlight
---@see https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#documentHighlight
function M.buf_highlight_references(bufnr, references) function M.buf_highlight_references(bufnr, references)
validate { bufnr = {bufnr, 'n', true} } validate { bufnr = {bufnr, 'n', true} }
for _, reference in ipairs(references) do for _, reference in ipairs(references) do