docs: do not hardcode LSP version in URL #25648

This commit is contained in:
Maria José Solano 2023-10-16 08:13:37 -07:00 committed by GitHub
parent 0892c1cd94
commit c46a6c065e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 13 additions and 13 deletions

View File

@ -444,7 +444,7 @@ The server will typically provide one token per identifier in the source code.
The token will have a `type` such as "function" or "variable", and 0 or more The token will have a `type` such as "function" or "variable", and 0 or more
`modifier`s such as "readonly" or "deprecated." The standard types and `modifier`s such as "readonly" or "deprecated." The standard types and
modifiers are described here: modifiers are described here:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_semanticTokens https://microsoft.github.io/language-server-protocol/specification/#textDocument_semanticTokens
LSP servers may also use off-spec types and modifiers. LSP servers may also use off-spec types and modifiers.
The LSP client adds one or more highlights for each token. The highlight The LSP client adds one or more highlights for each token. The highlight
@ -1232,7 +1232,7 @@ format({options}) *vim.lsp.buf.format()*
optional fields: optional fields:
• formatting_options (table|nil): Can be used to specify • formatting_options (table|nil): Can be used to specify
FormattingOptions. Some unspecified options will be FormattingOptions. Some unspecified options will be
automatically derived from the current Nvim options. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#formattingOptions automatically derived from the current Nvim options. See https://microsoft.github.io/language-server-protocol/specification/#formattingOptions
• timeout_ms (integer|nil, default 1000): Time in • timeout_ms (integer|nil, default 1000): Time in
milliseconds to block for formatting requests. No effect milliseconds to block for formatting requests. No effect
if async=true if async=true
@ -1654,7 +1654,7 @@ buf_highlight_references({bufnr}, {references}, {offset_encoding})
• {offset_encoding} (string) One of "utf-8", "utf-16", "utf-32". • {offset_encoding} (string) One of "utf-8", "utf-16", "utf-32".
See also: ~ See also: ~
• https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent • https://microsoft.github.io/language-server-protocol/specification/#textDocumentContentChangeEvent
*vim.lsp.util.character_offset()* *vim.lsp.util.character_offset()*
character_offset({buf}, {row}, {col}, {offset_encoding}) character_offset({buf}, {row}, {col}, {offset_encoding})

View File

@ -160,7 +160,7 @@ The following new APIs or features were added.
`workspace.didChangeWatchedFiles.dynamicRegistration=true` capability. `workspace.didChangeWatchedFiles.dynamicRegistration=true` capability.
• |vim.diagnostic| now supports LSP DiagnosticsTag. • |vim.diagnostic| now supports LSP DiagnosticsTag.
See: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticTag See: https://microsoft.github.io/language-server-protocol/specification/#diagnosticTag
• |vim.diagnostic.is_disabled()| checks if diagnostics are disabled in a given • |vim.diagnostic.is_disabled()| checks if diagnostics are disabled in a given
buffer or namespace. buffer or namespace.

View File

@ -122,9 +122,9 @@ The following new APIs and features were added.
• LSP • LSP
• LSP method names are available in |vim.lsp.protocol.Methods|. • LSP method names are available in |vim.lsp.protocol.Methods|.
• Implemented LSP inlay hints: |vim.lsp.inlay_hint()| • Implemented LSP inlay hints: |vim.lsp.inlay_hint()|
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_inlayHint https://microsoft.github.io/language-server-protocol/specification/#textDocument_inlayHint
• Implemented pull diagnostic textDocument/diagnostic: |vim.lsp.diagnostic.on_diagnostic()| • Implemented pull diagnostic textDocument/diagnostic: |vim.lsp.diagnostic.on_diagnostic()|
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_diagnostic https://microsoft.github.io/language-server-protocol/specification/#textDocument_diagnostic
• Added |vim.lsp.status()| to consume the last progress messages as a string. • Added |vim.lsp.status()| to consume the last progress messages as a string.
• LSP client now always saves and restores named buffer marks when applying • LSP client now always saves and restores named buffer marks when applying
text edits. text edits.

View File

@ -1,4 +1,4 @@
--- Grammar for LSP snippets, based on https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax --- Grammar for LSP snippets, based on https://microsoft.github.io/language-server-protocol/specification/#snippet_syntax
local lpeg = vim.lpeg local lpeg = vim.lpeg
local P, S, R, V = lpeg.P, lpeg.S, lpeg.R, lpeg.V local P, S, R, V = lpeg.P, lpeg.S, lpeg.R, lpeg.V

View File

@ -159,7 +159,7 @@ end
--- - formatting_options (table|nil): --- - formatting_options (table|nil):
--- Can be used to specify FormattingOptions. Some unspecified options will be --- Can be used to specify FormattingOptions. Some unspecified options will be
--- automatically derived from the current Nvim options. --- automatically derived from the current Nvim options.
--- See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#formattingOptions --- See https://microsoft.github.io/language-server-protocol/specification/#formattingOptions
--- - timeout_ms (integer|nil, default 1000): --- - timeout_ms (integer|nil, default 1000):
--- Time in milliseconds to block for formatting requests. No effect if async=true --- Time in milliseconds to block for formatting requests. No effect if async=true
--- - bufnr (number|nil): --- - bufnr (number|nil):

View File

@ -623,7 +623,7 @@ M[ms.window_showDocument] = function(_, result, ctx, _)
return { success = success or false } return { success = success or false }
end end
---@see https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_inlayHint_refresh ---@see https://microsoft.github.io/language-server-protocol/specification/#workspace_inlayHint_refresh
M[ms.workspace_inlayHint_refresh] = function(err, result, ctx, config) M[ms.workspace_inlayHint_refresh] = function(err, result, ctx, config)
return require('vim.lsp.inlay_hint').on_refresh(err, result, ctx, config) return require('vim.lsp.inlay_hint').on_refresh(err, result, ctx, config)
end end

View File

@ -387,7 +387,7 @@ end
---@param lastline integer line to begin search in old_lines for last difference ---@param lastline integer line to begin search in old_lines for last difference
---@param new_lastline integer line to begin search in new_lines for last difference ---@param new_lastline integer line to begin search in new_lines for last difference
---@param offset_encoding string encoding requested by language server ---@param offset_encoding string encoding requested by language server
---@return table TextDocumentContentChangeEvent see https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent ---@return table TextDocumentContentChangeEvent see https://microsoft.github.io/language-server-protocol/specification/#textDocumentContentChangeEvent
function M.compute_diff( function M.compute_diff(
prev_lines, prev_lines,
curr_lines, curr_lines,

View File

@ -1829,7 +1829,7 @@ do --[[ References ]]
---@param bufnr integer Buffer id ---@param bufnr integer Buffer id
---@param references table List of `DocumentHighlight` objects to highlight ---@param references table List of `DocumentHighlight` objects to highlight
---@param offset_encoding string One of "utf-8", "utf-16", "utf-32". ---@param offset_encoding string One of "utf-8", "utf-16", "utf-32".
---@see https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent ---@see https://microsoft.github.io/language-server-protocol/specification/#textDocumentContentChangeEvent
function M.buf_highlight_references(bufnr, references, offset_encoding) function M.buf_highlight_references(bufnr, references, offset_encoding)
validate({ validate({
bufnr = { bufnr, 'n', true }, bufnr = { bufnr, 'n', true },

View File

@ -35,7 +35,7 @@ end
-- Gets the Lua symbol for a given fully-qualified LSP method name. -- Gets the Lua symbol for a given fully-qualified LSP method name.
local function name(s) local function name(s)
-- "$/" prefix is special: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#dollarRequests -- "$/" prefix is special: https://microsoft.github.io/language-server-protocol/specification/#dollarRequests
return s:gsub('^%$', 'dollar'):gsub('/', '_') return s:gsub('^%$', 'dollar'):gsub('/', '_')
end end
@ -44,7 +44,7 @@ local function gen_methods(protocol)
'-- Generated by gen_lsp.lua, keep at end of file.', '-- Generated by gen_lsp.lua, keep at end of file.',
'--- LSP method names.', '--- LSP method names.',
'---', '---',
'---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#metaModel', '---@see https://microsoft.github.io/language-server-protocol/specification/#metaModel',
'protocol.Methods = {', 'protocol.Methods = {',
} }
local indent = (' '):rep(2) local indent = (' '):rep(2)