aboutsummaryrefslogtreecommitdiff
path: root/src/gen/gen_lsp.lua
Commit message (Collapse)AuthorAge
* fix(lsp): support nested workspace registrations #39574Tristan Knight2026-05-05
| | | | | | | | | | | Problem: Nested workspace capabilities like workspace.fileOperations.didCreate and workspace.textDocumentContent are not handled consistently for dynamic and static registration provider lookup. Solution: Generate explicit registration-provider mappings from the LSP metadata and use them when registering and querying capabilities. Add coverage for dynamic and static nested workspace registrations.
* fix(lsp): map all LSP methods to server capabilities (#37910)Tristan Knight2026-02-16
|
* refactor(lsp): centralize provider capability resolution #37221Tristan Knight2026-02-14
| | | | | | | | - Refactor LSP client to use unified provider-based capability lookup for diagnostics and other features. - Introduce `_provider_value_get` to abstract capability retrieval, supporting both static and dynamic registrations. - Update diagnostic handling and protocol mappings to leverage provider-centric logic.
* feat(lsp): support range + full semantic token requests #37611jdrouhard2026-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the LSP Spec: > There are two uses cases where it can be beneficial to only compute > semantic tokens for a visible range: > > - for faster rendering of the tokens in the user interface when a user > opens a file. In this use case, servers should also implement the > textDocument/semanticTokens/full request as well to allow for flicker > free scrolling and semantic coloring of a minimap. > - if computing semantic tokens for a full document is too expensive, > servers can only provide a range call. In this case, the client might > not render a minimap correctly or might even decide to not show any > semantic tokens at all. This commit unifies the usage of range and full/delta requests as recommended by the LSP spec and aligns neovim with the way other LSP clients use these request types for semantic tokens. When a server supports range requests, neovim will simultaneously send a range request and a full/delta request when first opening a file, and will continue to issue range requests until a full response is processed. At that point, range requests cease and full (or delta) requests are used going forward. The range request should allow servers to return a result faster for quicker highlighting of the file while it works on the potentially more expensive full result. If a server decides the full result is too expensive, it can just error out that request, and neovim will continue to use range requests. This commit also fixes and cleans up some other things: - gen_lsp: registrationMethod or registrationOptions imply dynamic registration support - move autocmd creation/deletion to on_attach/on_detach - debounce requests due to server refresh notifications - fix off by one issue in tokens_to_ranges() iteration
* fix(lsp): improve dynamic registration handling #37161Tristan Knight2026-01-02
| | | | | | | | Work on #37166 - Dynamic Registration Tracking via Provider - Supports_Method - Multiple Registrations - RegistrationOptions may dictate support for a method
* refactor(lsp): unify capability checks and registration #36781Tristan Knight2025-12-06
| | | | | | | Problem: Our LSP type system didnt have a concept of RegistrationMethods, this is where the method to dynamically register for a capability is sent to a different method endpoint then is used to call it. Eg `textDocument/semanticTokens` rather than the specific full/range/delta methods Solution: Extended generator to create `vim.lsp.protocol.Methods.Registration` with these registration methods. Also extend `_request_name_to_client_capability` to cover these methods. Adjust typing to suit
* fix(lsp): include missing LSP methods and update type annotationsDavidyz2025-10-16
|
* fix(lsp): add deprecation comment to `gen_lsp` (#36185)Maria Solano2025-10-14
|
* fix(lsp): use LSP method type in more places (#36069)Maria Solano2025-10-07
|
* fix(lsp): deprecate `vim.lsp.protocol.Methods` (#35998)Maria Solano2025-10-04
|
* feat(lsp): document method types (#35934)Maria Solano2025-09-27
|
* fix(lsp): decode 'null' in server responses as vim.NIL #34849skewb1k2025-08-03
| | | | | | | | | | | | | | | | Problem: Previously, 'null' value in LSP responses were decoded as 'nil'. This caused ambiguity for fields typed as '? | null' and led to loss of explicit 'null' values, particularly in 'data' parameters. Solution: Decode all JSON 'null' values as 'vim.NIL' and adjust handling where needed. This better aligns with the LSP specification, where 'null' and absent fields are distinct, and 'null' should not be used to represent missing values. This also enables proper validation of response messages to ensure that exactly one of 'result' or 'error' is present, as required by the JSON-RPC specification.
* fix: remove unnecessary `nvim -l` from `gen` command #33676Maria José Solano2025-04-27
|
* feat(lsp): generate method to client capability mapMaria José Solano2025-04-26
|
* refactor(lsp): gen_lspLewis Russell2025-04-17
| | | | | | | | | | - Simplify usage: - Instead of `nvim -l src/gen/gen_lsp.lua gen` now just run `./src/gen/gen_lsp.lua` - Removed `--methods` and `--capabilities` options. - Improved rendering code in various areas.
* feat(lsp): use stricter types for methodsLewis Russell2025-04-17
| | | | | | | | | | | | This change modifies gen_lsp.lua so alias types are generated for various types of lsp methods to distinguish between notifications and requests: - vim.lsp.protocol.Method.ServerToClient.Request - vim.lsp.protocol.Method.ServerToClient.Notification - vim.lsp.protocol.Method.ClientToServer.Request - vim.lsp.protocol.Method.ClientToServer.Notification These types are then used instead of `string` where appropriate.
* build: move all generator scripts to `src/gen/`Lewis Russell2025-02-26
- Move all generator Lua scripts to the `src/gen/` - Add a `.luarc.json` to `src/gen/` - Add a `preload.lua` to `src/gen/` - Add `src` to `package.path` so it aligns with `.luarc.json' - Fix all `require` statements in `src/gen/` so they are consistent: - `require('scripts.foo')` -> `require('gen.foo')` - `require('src.nvim.options')` -> `require('nvim.options')` - `require('api.dispatch_deprecated')` -> `require('nvim.api.dispatch_deprecated')`