Maria Solano
b938638d2d
fix(lsp): deprecate vim.lsp.protocol.Methods
( #35998 )
2025-10-04 21:09:13 -07:00
Maria Solano
c5c6ddba91
feat(lsp): document method types ( #35934 )
2025-09-27 14:52:30 -07:00
Maria Solano
5fbc5ab810
fix(lsp): use correct workspace.diagnostics
capability key ( #35937 )
2025-09-27 13:40:52 -07:00
Riley Bruins
77e3efecee
feat(lsp): support textDocument/onTypeFormatting
( #34637 )
...
Implements [on-type
formatting](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#textDocument_onTypeFormatting )
using a `vim.on_key()` approach to listen to typed keys. It will listen
to keys on the *left hand side* of mappings. The `on_key` callback is
cleared when detaching the last on-type formatting client. This feature
is disabled by default.
Co-authored-by: Maria José Solano <majosolano99@gmail.com >
2025-08-31 14:09:12 -07:00
Yi Ming
0e70aa0e86
feat(lsp): support textDocument/inlineCompletion
2025-08-25 09:48:27 +08:00
skewb1k
7cc07e8383
feat(lsp): support signature help noActiveParameterSupport #34838
2025-08-11 14:31:57 -07:00
Maria José Solano
9139c4f90f
fix(lsp): update capability maps ( #35227 )
2025-08-07 19:33:52 -07:00
Riley Bruins
371aa1c566
feat(lsp): diagnostic related documents support
2025-07-21 16:11:24 -07:00
Riley Bruins
c5167ffc18
feat(lsp): support linked editing ranges #34388
...
ref: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_linkedEditingRange
2025-07-19 10:54:49 -07:00
Riley Bruins
2031287e93
feat(lsp): support diagnostic related information ( #34474 )
2025-07-07 13:05:02 -04:00
Maria José Solano
957093da0d
feat(lsp): handle deprecated document symbols ( #34751 )
2025-07-06 09:39:37 -07:00
Maria José Solano
3eaa6c5a66
fix(lsp): add RequestFailed
error code constant #34645
...
Also remove `serverErrorStart/End` as [the spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#errorCodes )
says that they're deprecated and don't even represent a real error code.
2025-06-26 02:23:31 -07:00
Maria José Solano
835f11595f
feat(lsp): support annotated text edits ( #34508 )
2025-06-23 06:30:49 -07:00
Riley Bruins
35756022cb
fix(lsp): advertise supported fold kinds ( #34461 )
...
This commit also makes it so that folds which have an unsupported fold
kind have their `kind` ignored.
2025-06-16 16:05:00 -04:00
Riley Bruins
492ea28612
feat(lsp): handle disabled code actions ( #34453 )
...
This commit also makes it so that disabled code actions are not
displayed unless the trigger kind is "Invoked".
2025-06-16 12:41:42 -04:00
Riley Bruins
76d213efbe
feat(lsp): support multiline semantic tokens #34458
2025-06-13 08:30:08 -07:00
Riley Bruins
82d0883c2d
fix(lsp): correct diagnostic data support and related info capabilities ( #34454 )
2025-06-12 14:00:42 -04:00
Riley Bruins
f99e3a8a2a
feat(lsp): incremental selection via "textDocument/selectionRange" #34011
...
Select outwards with "an" and inwards with "in" in Visual mode.
Ranges are reset when leaving Visual mode.
2025-06-12 09:25:19 -07:00
Riley Bruins
bac133e4b6
fix(lsp): announce diagnostic tag support ( #34436 )
...
This commit also adds a type annotation to the returned client
capabilities table, because without it lua_ls does not provide
autocompletion for the fields within the table.
2025-06-10 21:26:06 -07:00
Maria José Solano
cb4559bc32
feat(lsp): workspace diagnostic support ( #34262 )
...
* refactor(lsp): remove underscore prefix from local variables
* feat(lsp): workspace diagnostic support
2025-06-09 13:02:00 -04:00
Maria José Solano
4db58f78b4
fix(lsp): announce normalizesLineEndings
capability ( #34175 )
2025-05-25 15:04:38 -07:00
Maria José Solano
8f5bd569c5
feat(lsp): support documentColor
dynamic registration #33800
2025-05-04 07:00:21 -07:00
Maria José Solano
66339e0641
feat(lsp): generate method to client capability map
2025-04-26 18:24:39 -07:00
Maria José Solano
9ff1239634
feat(lsp): support textDocument/documentColor
...
test(lsp): add tests form `vim.lsp.document_color`
2025-04-24 18:48:19 +02:00
Lewis Russell
d7e0d46ffa
feat(lsp): use stricter types for methods
...
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.
2025-04-17 11:40:45 +01:00
Maria José Solano
3b0fe2659e
feat(lsp): support completion context #32793
...
Problem:
vim.lsp.completion with "autotrigger" enabled, does not send
completion context, even though it has all the necessary info.
Solution:
Include the context for "autotrigger".
trigger() also optionally accepts context when manually invoked.
2025-03-10 09:20:27 -07:00
Maria José Solano
41b07b128c
feat(lsp): support for resolving code action command ( #32704 )
...
* fix(lsp): don't call codeAction_resolve with commands
* feat(lsp): support for resolving code action command
2025-03-06 08:21:47 +00:00
Maria José Solano
e4c1f6667b
feat(lsp): use the meta model to generate server capability map
2025-02-21 08:40:33 -08:00
Maria José Solano
ae2fd91b41
feat(lsp): update LSP types
2025-02-17 17:52:55 -08:00
Mathias Fussenegger
f20335a54c
feat(lsp): add support for completionItem.command resolving
...
`command` was already resolved via a `completionItem/resolve` request
but only if `additionalTextEdits` were also present, and the
`resolveSupport` capability wasn't listed.
Closes https://github.com/neovim/neovim/issues/32406
2025-02-14 19:49:08 +01:00
Lewis Russell
6aa42e8f92
fix: resolve all remaining LuaLS diagnostics
2025-01-27 16:37:50 +00:00
Yi Ming
a1e313ded6
feat(lsp): support textDocument/foldingRange
( #31311 )
...
* refactor(shared): extract `vim._list_insert` and `vim._list_remove`
* feat(lsp): add `vim.lsp.foldexpr()`
* docs(lsp): add a todo for state management
* feat(lsp): add `vim.lsp.folding_range.foldclose()`
* feat(lsp): schedule `foldclose()` if the buffer is not up-to-date
* feat(lsp): add `vim.lsp.foldtext()`
* feat(lsp): support multiple folding range providers
* refactor(lsp): expose all folding related functions under `vim.lsp.*`
* perf(lsp): add `lsp.MultiHandler` for do `foldupdate()` only once
2024-11-29 12:40:32 +00:00
Gregory Anders
29c72cdf4a
fix(lsp): retrigger diagnostics request on server cancellation ( #31345 )
...
Co-authored-by: Jesse <github@jessebakker.com >
2024-11-25 11:48:11 -06:00
Lewis Russell
d3e4ffafff
feat(lsp): support utf-8 and utf-32 position encodings
...
Resolves #30034
2024-11-14 15:32:49 +00:00
Lewis Russell
9b357e30fd
feat(lsp)!: remove client-server handlers from vim.lsp.handlers
...
- Partition the handlers in vim.lsp.handlers as:
- client to server response handlers (RCS)
- server to client request handlers (RSC)
- server to client notification handlers (NSC)
Note use string indexes instead of protocol.methods for improved
typing in LuaLS (tip: use hover on RCS, RSC or NSC).
2024-11-01 09:17:39 +00:00
Lewis Russell
3275ae830d
fix(lsp.protocal): improve typing of constants
2024-10-24 10:53:03 +01:00
Yi Ming
305012ea07
fix(lsp): enable additionalPropertiesSupport
2024-10-04 12:22:46 +02:00
Ricardo Casía
766d503627
docs(lsp): annotate with vim.lsp.protocol.Methods
enum #29521
...
Added the enum type annotation `vim.lsp.protocol.Methods` to provide some intellisense support.
2024-08-20 05:52:14 -07:00
Mathias Fußenegger
6072153796
feat(lsp): announce codeLens resolveSupport ( #29956 )
...
The codelens implementation can resolve command via `codeLens/resolve`.
The spec added client capabilities for that:
https://github.com/microsoft/language-server-protocol/pull/1979
2024-08-03 11:14:12 +02:00
glepnir
4e90bc3023
feat(lsp): lsp.completion support set deprecated ( #29882 )
...
Problem: CompletionItem in lsp spec mentioned the deprecated attribute
Solution: when item has deprecated attribute set hl_group to DiagnosticDeprecated
in complete function
2024-07-31 16:15:34 +02:00
Tom Praschan
5581a95534
feat(lsp): vim.lsp.buf.format() supports textDocument/rangesFormatting #27323
...
While this relies on a proposed LSP 3.18 feature, it's fully backwards
compatible, so IMO there's no harm in adding this already.
Looks like some servers already support for this e.g.
- gopls: https://go-review.googlesource.com/c/tools/+/510235
- clangd: https://github.com/llvm/llvm-project/pull/80180
Fixes #27293
2024-06-24 07:54:56 -07:00
Lewis Russell
5e49ef0af3
refactor(lua): improve type annotations
2024-06-11 12:45:43 +01:00
Maria José Solano
ff097f2091
feat(lsp): completion side effects
2024-05-27 14:53:28 -07:00
Lewis Russell
c1a95d9653
fix(lsp): disable didChangeWatchedFiles on Linux
...
Problem:
The file watcher backends for Linux have too many limitations and
doesn't work reliably.
Solution:
disable didChangeWatchedFiles on Linux
Ref: #27807 , #28058 , #23291 , #26520
2024-05-10 14:59:44 +01:00
Maria José Solano
e52c25b761
feat(lua): deprecate vim.tbl_add_reverse_lookup
2024-03-07 10:24:34 +01:00
Christian Clason
2c8f36a3b0
fix(lsp): use plain loop for non-list-like table of protocol values
...
Fixup for #27628
Closes #27669
2024-02-29 11:37:30 +01:00
Maria José Solano
853f647da6
fix(lsp): handle reverse lookup in capabilities
2024-02-28 20:20:02 +00:00
Maria José Solano
d981670bc9
refactor(lsp): remove outdated comment
2024-02-28 20:20:02 +00:00
Maria José Solano
63f9c2da9a
feat(lsp): support completion itemDefaults
2024-02-27 16:50:51 +01:00
Maria José Solano
cc15ba212c
refactor(lsp): typings for protocol constants
2024-02-19 11:23:35 +00:00