aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/_dynamic.lua
Commit message (Collapse)AuthorAge
* refactor(lsp): fold in dynamic_registration code into the clientLewis Russell2024-11-18
| | | | | | | | | | | Problem: Capability register logic is spread across 3 files. Solution: - Consolidate (and simplify) logic into the client. - Teach client.supports_method about resolve methods
* refactor(lua): improve type annotationsLewis Russell2024-06-11
|
* refactor(types): more fixes (2)Lewis Russell2024-03-06
|
* refactor(lsp): resolve the config-client entanglementLewis Russell2024-02-13
| | | | | | | | | | | | | | | | | | | | | Previously the LSP-Client object contained some fields that are also in the client config, but for a lot of other fields, the config was used directly making the two objects vaguely entangled with either not having a clear role. Now the config object is treated purely as config (read-only) from the client, and any fields the client needs from the config are now copied in as additional fields. This means: - the config object is no longet normalised and is left as the user provided it. - the client only reads the config on creation of the client and all other implementations now read the clients version of the fields. In addition, internal support for multiple callbacks has been added to the client so the client tracking logic (done in lua.lsp) can be done more robustly instead of wrapping the user callbacks which may error.
* refactor(lsp): add type annotationsMaria José Solano2024-02-10
|
* refactor(lsp): move client code to a regular Lua classLewis Russell2024-02-07
| | | | | | | | | | Problem: The LSP client code is implemented as a complicated closure-class (class defined in a single function). Solution: Move LSP client code to a more conventional Lua class and move to a separate file.
* refactor: create function for deferred loadingdundargoc2024-02-03
| | | | | | | | | | | | | | | | The benefit of this is that users only pay for what they use. If e.g. only `vim.lsp.buf_get_clients()` is called then they don't need to load all modules under `vim.lsp` which could lead to significant startuptime saving. Also `vim.lsp.module` is a bit nicer to user compared to `require("vim.lsp.module")`. This isn't used for some nested modules such as `filetype` as it breaks tests with error messages such as "attempt to index field 'detect'". It's not entirely certain the reason for this, but it is likely it is due to filetype being precompiled which would imply deferred loading isn't needed for performance reasons.
* fix(lsp): filetype matching to documentSelector in dynamic capabilities (#25425)Michal Liszcz2023-12-22
| | | | | | | Use the get_language_id client option to resolve the filetype when matching the document selector in a dynamic capability. Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
* refactor(lsp): move glob parsing to util (#26519)Steven Arcangeli2023-12-22
| | | | | | | | refactor(lsp): move glob parsing to vim.glob Moving the logic for using vim.lpeg to create a match pattern from a glob into `vim.glob`. There are several places in the LSP spec that use globs, and it's very useful to have glob matching as a generally-available utility.
* 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