aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
Commit message (Collapse)AuthorAge
* fix: resolve all remaining LuaLS diagnosticsLewis Russell2025-01-27
|
* feat(lsp): support `textDocument/foldingRange` (#31311)Yi Ming2024-11-29
| | | | | | | | | | | | | | | | | | | * 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
* fix(lsp): retrigger diagnostics request on server cancellation (#31345)Gregory Anders2024-11-25
| | | Co-authored-by: Jesse <github@jessebakker.com>
* feat(lsp): support utf-8 and utf-32 position encodingsLewis Russell2024-11-14
| | | | Resolves #30034
* feat(lsp)!: remove client-server handlers from vim.lsp.handlersLewis Russell2024-11-01
| | | | | | | | | | - 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).
* fix(lsp.protocal): improve typing of constantsLewis Russell2024-10-24
|
* fix(lsp): enable `additionalPropertiesSupport`Yi Ming2024-10-04
|
* docs(lsp): annotate with `vim.lsp.protocol.Methods` enum #29521Ricardo Casía2024-08-20
| | | Added the enum type annotation `vim.lsp.protocol.Methods` to provide some intellisense support.
* feat(lsp): announce codeLens resolveSupport (#29956)Mathias Fußenegger2024-08-03
| | | | | | | 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
* feat(lsp): lsp.completion support set deprecated (#29882)glepnir2024-07-31
| | | | | | Problem: CompletionItem in lsp spec mentioned the deprecated attribute Solution: when item has deprecated attribute set hl_group to DiagnosticDeprecated in complete function
* feat(lsp): vim.lsp.buf.format() supports textDocument/rangesFormatting #27323Tom Praschan2024-06-24
| | | | | | | | | | 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
* refactor(lua): improve type annotationsLewis Russell2024-06-11
|
* feat(lsp): completion side effectsMaria José Solano2024-05-27
|
* fix(lsp): disable didChangeWatchedFiles on LinuxLewis Russell2024-05-10
| | | | | | | | | | | | | 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
* feat(lua): deprecate vim.tbl_add_reverse_lookupMaria José Solano2024-03-07
|
* fix(lsp): use plain loop for non-list-like table of protocol valuesChristian Clason2024-02-29
| | | | | | Fixup for #27628 Closes #27669
* fix(lsp): handle reverse lookup in capabilitiesMaria José Solano2024-02-28
|
* refactor(lsp): remove outdated commentMaria José Solano2024-02-28
|
* feat(lsp): support completion itemDefaultsMaria José Solano2024-02-27
|
* refactor(lsp): typings for protocol constantsMaria José Solano2024-02-19
|
* feat(lua): add noref to deepcopyLewis Russell2024-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Currently `deepcopy` hashes every single tables it copies so it can be reused. For tables of mostly unique items that are non recursive, this hashing is unnecessarily expensive Solution: Port the `noref` argument from Vimscripts `deepcopy()`. The below benchmark demonstrates the results for two extreme cases of tables of different sizes. One table that uses the same table lots of times and one with all unique tables. | test | `noref=false` (ms) | `noref=true` (ms) | | -------------------- | ------------------ | ----------------- | | unique tables (50) | 6.59 | 2.62 | | shared tables (50) | 3.24 | 6.40 | | unique tables (2000) | 23381.48 | 2884.53 | | shared tables (2000) | 3505.54 | 14038.80 | The results are basically the inverse of each other where `noref` is much more performance on tables with unique fields, and `not noref` is more performant on tables that reuse fields.
* docs(gen_lsp.lua): re-generate vim.lsp._meta.protocol type annotationsJongwook Choi2023-12-27
| | | | | | | | | | The purpose of this commit is to make diff clean and easy to read; to see the diff resulted from actual changes in gen_lsp.lua, not from the updated LSP protocol JSON data. Ran: `nvim -l scripts/gen_lsp.lua gen --methods` Based on 3.18.0 (2023-12-23)
* feat(lsp): more annotationsLewis Russell2023-12-14
|
* fix(lsp): advertise workspace.didChangeConfiguration capability (#26028)Chris Simon2023-11-13
| | | | This ensures workspace/didChangeConfiguration notification sent after init is correctly handled
* feat(lsp)!: vim.lsp.inlay_hint.get(), enable(), is_enabled() #25512LW2023-11-12
| | | | | | | | | | | | | | | | | | refactor!: `vim.lsp.inlay_hint()` -> `vim.lsp.inlay_hint.enable()` Problem: The LSP specification allows inlay hints to include tooltips, clickable label parts, and code actions; but Neovim provides no API to query for these. Solution: Add minimal viable extension point from which plugins can query for inlay hints in a range, in order to build functionality on top of. Possible Next Steps --- - Add `virt_text_idx` field to `vim.fn.getmousepos()` return value, for usage in mappings of `<LeftMouse>`, `<C-LeftMouse>`, etc
* refactor(lsp): move completion logic into _completion moduleMathias Fussenegger2023-10-21
| | | | | To reduce cross-chatter between modules and for https://github.com/neovim/neovim/issues/25272 Also preparing for https://github.com/neovim/neovim/issues/25714
* feat(lsp): add snippet API (#25301)Maria José Solano2023-10-21
|
* fix(gen_lsp.lua): no notifications in lsp.Methods #24530Raphael2023-08-03
| | | | | | | | | Problem: - Notifications are missing from `lsp.Methods`. - Need a way to represent `$/` prefixed methods. Solution: - Generate notifications. - Use "dollar_" prefix for `$/` methods.
* feat(gen_lsp.lua): sort by name, handle failure #24504Justin M. Keyes2023-08-01
|
* feat(gen_lsp.lua): protocol.Methods #24504mathew2023-08-01
|
* fix(lsp): announce publishDiagnostics.dataSupport (#24442)Bruce Weirdan2023-07-24
| | | | | | | | | | | Neovim already passed `data` element from published diagnostic to code action, but failed to announce it in client capabilities. Here is the test that shows that `data` element is returned by `vim.lsp.diagnostic.get_line_diagnostics()`: https://github.com/neovim/neovim/blob/f56c1848091bb64c63b5bc25ec74bcbd2f52bdde/test/functional/plugin/lsp/diagnostic_spec.lua#L103-L115 and then `get_line_diagnostics()` is used to construct the context for code action request: https://github.com/neovim/neovim/blob/f56c1848091bb64c63b5bc25ec74bcbd2f52bdde/runtime/lua/vim/lsp/buf.lua#L742
* feat(lsp): implement textDocument/diagnostic (#24128)Chris AtLee2023-07-20
|
* fix(lsp): remove unknown LSP protocol property (#24345)Techatrix2023-07-14
| | | 'hierarchicalWorkspaceSymbolSupport' is not part of the LSP Specification
* fix(lsp): lint warnings, default offset_encoding #24046Raphael2023-07-01
| | | | | - fix lint / analysis warnings - locations_to_items(): get default offset_encoding from active client - character_offset(): get default offset_encoding from active client
* feat(lsp): opt-in to dynamicRegistration for inlay hints (#24102)Mathias Fußenegger2023-06-22
| | | | | Since https://github.com/neovim/neovim/pull/23681 there is dynamic registration support. We should use that for new features unless there is a good reason to turn it off.
* feat(lsp): add handlers for inlay hints (#23736)Chinmay Dalal2023-06-11
| | | initial support; public API left for a follow-up PR
* fix(lsp): reduce diagnostics and add more types (#23948)Lewis Russell2023-06-07
|
* fix(lsp): use only utf-16 in default client positionEncodings (#23903)Gregory Anders2023-06-05
| | | | The Nvim client does not yet support multiple offset encodings for clients in the same buffer. Until it does, stick to utf-16 by default.
* feat(lsp): include positionEncodings in default client capabilitiesGregory Anders2023-06-01
|
* feat(lsp): initial support for dynamic capabilities (#23681)Folke Lemaitre2023-05-28
| | | | | | | | | | | | - `client.dynamic_capabilities` is an object that tracks client register/unregister - `client.supports_method` will additionally check if a dynamic capability supports the method, taking document filters into account. But only if the client enabled `dynamicRegistration` for the capability - updated the default client capabilities to include dynamicRegistration for: - formatting - rangeFormatting - hover - codeAction - hover - rename
* feat(lsp): enable workspace/didChangeWatchedFiles by default (#23190)Jon Huhn2023-04-22
|
* refactor: remove modelines from Lua filesGregory Anders2023-04-13
| | | | Now that we have builtin EditorConfig support and a formatting check in CI, these are not necessary.
* feat(diagnostic): add support for tagsLewis Russell2023-03-30
| | | | | | The LSP spec supports two tags that can be added to diagnostics: unnecessary and deprecated. Extend vim.diagnostic to be able to handle these.
* refactor(lsp): remove _resolve_capabilities_compat (#22628)Raphael2023-03-11
|
* feat(lsp): implement workspace/didChangeWatchedFiles (#22405)Jon Huhn2023-03-05
|
* fix(lsp): fix some type annotations (#22397)Mathias Fußenegger2023-02-25
|
* Revert "feat(lsp): implement workspace/didChangeWatchedFiles (#21293)"Mathias Fussenegger2023-02-25
| | | | | | This reverts commit 5732aa706c639b3d775573d91d1139f24624629c. Causes editor to freeze in projects with many watcher registrations
* feat(lsp): implement workspace/didChangeWatchedFiles (#21293)Jon Huhn2023-02-25
|
* feat(lsp): add triggerKind option for vim.lsp.buf.code_action (#21905)kishii2023-01-21
|
* fix(lsp): correct callHierarchy capability to fix lsp.buf.incoming_calls() ↵2023-01-06
| | | | | (#21665) Co-authored-by: maozhongzhou <maozhongzhou@wps.cn>