mirror of
https://github.com/neovim/neovim.git
synced 2026-02-09 05:18:45 +00:00
* cache all tokens from various range requests for a given document
version
- all new token highlights are merged with previous highlights to
maintain order and the "marked" property
- this allows the tokens to stop flickering once they've loaded once
per document version
* abandon the processing coroutine if the request_id has changed instead
of relying only on the document version
- this will improve efficiency if a new range request is made while a
previous one was processing its result
* apply new highlights from processing coroutine directly to the current
result when the version hasn't changed
- this allows new highlights to be immediately drawable once they've
processed instead of waiting for the whole response to be processed
at once
* rpc layer was changed to provide the request ID back in success
callbacks, which is then provided as a request_id field on the handler
context to lsp handlers
19 lines
675 B
Lua
19 lines
675 B
Lua
---@meta
|
|
error('Cannot require a meta file')
|
|
|
|
---@alias lsp.Handler fun(err: lsp.ResponseError?, result: any, context: lsp.HandlerContext, config?: table): ...any
|
|
---@alias lsp.MultiHandler fun(results: table<integer,{err: lsp.ResponseError?, result: any, context: lsp.HandlerContext}>, context: lsp.HandlerContext, config?: table): ...any
|
|
|
|
---@class lsp.HandlerContext
|
|
---@field method vim.lsp.protocol.Method
|
|
---@field client_id integer
|
|
---@field request_id? integer
|
|
---@field bufnr? integer
|
|
---@field params? any
|
|
---@field version? integer
|
|
|
|
---@class lsp.ResponseError
|
|
---@field code integer
|
|
---@field message string
|
|
---@field data string|number|boolean|table[]|table|nil
|