mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
fix(lsp): replace @private with @nodoc for public client functions (#24415)
* fix(lsp): replace @private with @nodoc for public client functions To prevent lua-ls warnings in plugins which use the functions. * fix(lsp): remove duplicate type annotations/class definitions These annotations became duplicate with https://github.com/neovim/neovim/pull/23750
This commit is contained in:
committed by
GitHub
parent
966eb8e0b3
commit
7668f89d5b
@ -1455,7 +1455,7 @@ function lsp.start_client(config)
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
---@private
|
---@nodoc
|
||||||
--- Sends a request to the server.
|
--- Sends a request to the server.
|
||||||
---
|
---
|
||||||
--- This is a thin wrapper around {client.rpc.request} with some additional
|
--- This is a thin wrapper around {client.rpc.request} with some additional
|
||||||
@ -1559,7 +1559,7 @@ function lsp.start_client(config)
|
|||||||
return request_result
|
return request_result
|
||||||
end
|
end
|
||||||
|
|
||||||
---@private
|
---@nodoc
|
||||||
--- Sends a notification to an LSP server.
|
--- Sends a notification to an LSP server.
|
||||||
---
|
---
|
||||||
---@param method string LSP method name.
|
---@param method string LSP method name.
|
||||||
@ -1590,7 +1590,7 @@ function lsp.start_client(config)
|
|||||||
return client_active
|
return client_active
|
||||||
end
|
end
|
||||||
|
|
||||||
---@private
|
---@nodoc
|
||||||
--- Cancels a request with a given request id.
|
--- Cancels a request with a given request id.
|
||||||
---
|
---
|
||||||
---@param id (integer) id of request to cancel
|
---@param id (integer) id of request to cancel
|
||||||
@ -1613,7 +1613,8 @@ function lsp.start_client(config)
|
|||||||
-- Track this so that we can escalate automatically if we've already tried a
|
-- Track this so that we can escalate automatically if we've already tried a
|
||||||
-- graceful shutdown
|
-- graceful shutdown
|
||||||
local graceful_shutdown_failed = false
|
local graceful_shutdown_failed = false
|
||||||
---@private
|
|
||||||
|
---@nodoc
|
||||||
--- Stops a client, optionally with force.
|
--- Stops a client, optionally with force.
|
||||||
---
|
---
|
||||||
---By default, it will just ask the - server to shutdown without force. If
|
---By default, it will just ask the - server to shutdown without force. If
|
||||||
@ -2311,7 +2312,6 @@ function lsp.omnifunc(findstart, base)
|
|||||||
|
|
||||||
local startbyte
|
local startbyte
|
||||||
|
|
||||||
---@private
|
|
||||||
local function on_done()
|
local function on_done()
|
||||||
local mode = api.nvim_get_mode()['mode']
|
local mode = api.nvim_get_mode()['mode']
|
||||||
if mode == 'i' or mode == 'ic' then
|
if mode == 'i' or mode == 'ic' then
|
||||||
|
@ -5,92 +5,17 @@
|
|||||||
---@class lsp.HandlerContext
|
---@class lsp.HandlerContext
|
||||||
---@field method string
|
---@field method string
|
||||||
---@field client_id integer
|
---@field client_id integer
|
||||||
---@field bufnr integer
|
---@field bufnr? integer
|
||||||
---@field params any
|
---@field params? any
|
||||||
|
|
||||||
---@class lsp.ResponseError
|
---@class lsp.ResponseError
|
||||||
---@field code integer
|
---@field code integer
|
||||||
---@field message string
|
---@field message string
|
||||||
---@field data string|number|boolean|table[]|table|nil
|
---@field data string|number|boolean|table[]|table|nil
|
||||||
|
|
||||||
---@class lsp.ShowMessageRequestParams
|
|
||||||
---@field type lsp.MessageType
|
|
||||||
---@field message string
|
|
||||||
---@field actions nil|lsp.MessageActionItem[]
|
|
||||||
|
|
||||||
---@class lsp.MessageActionItem
|
|
||||||
---@field title string
|
|
||||||
|
|
||||||
---@class lsp.FileEvent
|
|
||||||
---@field uri string
|
|
||||||
---@field type lsp.FileChangeType
|
|
||||||
|
|
||||||
---@class lsp.Position
|
|
||||||
---@field line integer
|
|
||||||
---@field character integer
|
|
||||||
|
|
||||||
---@class lsp.Range
|
|
||||||
---@field start lsp.Position
|
|
||||||
---@field end lsp.Position
|
|
||||||
|
|
||||||
---@class lsp.Diagnostic
|
|
||||||
---@field range lsp.Range
|
|
||||||
---@field message string
|
|
||||||
---@field severity? lsp.DiagnosticSeverity
|
|
||||||
---@field code integer | string
|
|
||||||
---@field source string
|
|
||||||
---@field tags? lsp.DiagnosticTag[]
|
|
||||||
---@field relatedInformation DiagnosticRelatedInformation[]
|
|
||||||
|
|
||||||
--- @class lsp.DocumentFilter
|
--- @class lsp.DocumentFilter
|
||||||
--- @field language? string
|
--- @field language? string
|
||||||
--- @field scheme? string
|
--- @field scheme? string
|
||||||
--- @field pattern? string
|
--- @field pattern? string
|
||||||
|
|
||||||
--- @alias lsp.DocumentSelector lsp.DocumentFilter[]
|
|
||||||
|
|
||||||
--- @alias lsp.RegisterOptions any | lsp.StaticRegistrationOptions | lsp.TextDocumentRegistrationOptions
|
--- @alias lsp.RegisterOptions any | lsp.StaticRegistrationOptions | lsp.TextDocumentRegistrationOptions
|
||||||
|
|
||||||
--- @class lsp.Registration
|
|
||||||
--- @field id string
|
|
||||||
--- @field method string
|
|
||||||
--- @field registerOptions? lsp.RegisterOptions
|
|
||||||
|
|
||||||
--- @alias lsp.RegistrationParams {registrations: lsp.Registration[]}
|
|
||||||
|
|
||||||
--- @class lsp.StaticRegistrationOptions
|
|
||||||
--- @field id? string
|
|
||||||
|
|
||||||
--- @class lsp.TextDocumentRegistrationOptions
|
|
||||||
--- @field documentSelector? lsp.DocumentSelector
|
|
||||||
|
|
||||||
--- @class lsp.Unregistration
|
|
||||||
--- @field id string
|
|
||||||
--- @field method string
|
|
||||||
|
|
||||||
--- @alias lsp.UnregistrationParams {unregisterations: lsp.Unregistration[]}
|
|
||||||
|
|
||||||
---@class lsp.Location
|
|
||||||
---@field uri string
|
|
||||||
---@field range lsp.Range
|
|
||||||
|
|
||||||
---@class lsp.MarkupContent
|
|
||||||
---@field kind string
|
|
||||||
---@field value string
|
|
||||||
|
|
||||||
---@class lsp.InlayHintLabelPart
|
|
||||||
---@field value string
|
|
||||||
---@field tooltip? string | lsp.MarkupContent
|
|
||||||
---@field location? lsp.Location
|
|
||||||
|
|
||||||
---@class lsp.TextEdit
|
|
||||||
---@field range lsp.Range
|
|
||||||
---@field newText string
|
|
||||||
|
|
||||||
---@class lsp.InlayHint
|
|
||||||
---@field position lsp.Position
|
|
||||||
---@field label string | lsp.InlayHintLabelPart[]
|
|
||||||
---@field kind? integer
|
|
||||||
---@field textEdits? lsp.TextEdit[]
|
|
||||||
---@field paddingLeft? boolean
|
|
||||||
---@field paddingRight? boolean
|
|
||||||
|
Reference in New Issue
Block a user