aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/buf.lua
Commit message (Collapse)AuthorAge
...
* feat(lsp): support signature help noActiveParameterSupport #34838skewb1k2025-08-11
|
* docs(lsp): specify formatting_options type (#35302)Riley Bruins2025-08-11
|
* feat(lsp): improve signature help display #35190skewb1k2025-08-06
| | | | | - Add delimiter between function signature and documentation, matching hover formatting - Show title only if there are multiple clients or multiple signatures - Avoid duplicating the title inside the window if it's already shown in the border
* revert(lsp): compare to `vim.NIL` in `lsp/buf.lua` (#35156)Maria José Solano2025-08-03
| | | | | revert(lsp): "compare to `vim.NIL` in `lsp/buf.lua` #35154" This reverts commit a5c598871bcc16f1bc6fb8d46eb826d83d7d0f24.
* fix(lsp): compare to `vim.NIL` in `lsp/buf.lua` #35154Maria José Solano2025-08-03
|
* fix(lsp): handle nil response in references request #35139Maria José Solano2025-08-02
|
* fix(lsp): don't override `config.title` in `vim.lsp.buf.signature_help()` #35075Maria José Solano2025-07-26
|
* fix(lsp): show notification with empty hover response (#35014)Maria José Solano2025-07-20
|
* refactor(lsp): narrower `hierarchy` argument type (#34799)Maria José Solano2025-07-06
|
* refactor(lsp): consistent usage of vim.notify #34802Maria José Solano2025-07-06
|
* fix(lsp): consistent use of `vim.notify`/logging with unsupported methodsMaria José Solano2025-07-04
|
* fix(lsp): remove extra notify on empty hoverMaria José Solano2025-07-04
|
* fix(lsp): include context for each client in multi-handler results (#34669)Maria José Solano2025-06-26
|
* refactor(lsp): use `vim.lsp.buf_request_all` internally (#34604)Maria José Solano2025-06-23
|
* fix(lsp): support v:count in selection_range() #34551Riley Bruins2025-06-17
| | | Co-authored-by: Yi Ming <ofseed@foxmail.com>
* feat(lsp): handle disabled code actions (#34453)Riley Bruins2025-06-16
| | | | This commit also makes it so that disabled code actions are not displayed unless the trigger kind is "Invoked".
* fix(lsp): add missing argument validations (#34519)Maria José Solano2025-06-16
|
* fix(lsp): use correct deprecation function (#34518)Maria José Solano2025-06-15
|
* feat(lsp): <Plug> mapping for signature help cycling #34039Tiago Inaba2025-06-12
| | | | | | Replace direct function mappings with `<Plug>` mappings for cycling through overloaded signatures, providing better customization options for users. This change keeps the default mapping (`<C-s>`) for cycling if `<Plug>(nvim.lsp.ctrl-s)` is not mapped.
* feat(lsp): incremental selection via "textDocument/selectionRange" #34011Riley Bruins2025-06-12
| | | | Select outwards with "an" and inwards with "in" in Visual mode. Ranges are reset when leaving Visual mode.
* feat(lsp): workspace diagnostic support (#34262)Maria José Solano2025-06-09
| | | | | * refactor(lsp): remove underscore prefix from local variables * feat(lsp): workspace diagnostic support
* fix: type fixesLewis Russell2025-06-06
| | | | Type fixes caught by emmylua
* docs: lsp, emoji, startup #33446Justin M. Keyes2025-04-27
| | | Co-authored-by: Maria José Solano <majosolano99@gmail.com>
* fix(lsp): cycling signatures with the default `config.focusable`Yi Ming2025-04-26
|
* fix(lsp): prioritize showing active signatureYi Ming2025-04-26
|
* fix(lsp): opts.reuse_win does not jump if buf is already open #33476Au.2025-04-17
| | | | | | | | | | | | | | | | Problem: `vim.lsp.buf.[implementation|definition|...]({ reuse_win = true })` does not jump cursor to existing window if buffer is already open. Steps to reproduce: 1. `nvim repro.lua` 2. Insert anything that lsp can read to open the library definition/implementation, e.g., `vim.keymap.set` 3. open `repro.lua` buffer and the library buffer side by side. 4. type `gd` over `set` to jump to the library definition. The open buffer is scrolled to the target line, but cursor does not jump. Solution: Call nvim_set_current_win if necessary.
* 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.
* fix(lsp): correctly check for "codeAction/resolve" supportTobias Schmitz2025-03-15
|
* fix(lsp): use unresolved code action when `codeAction/resolve` failsMaria José Solano2025-03-07
|
* feat(lsp): support for resolving code action command (#32704)Maria José Solano2025-03-06
| | | | | * fix(lsp): don't call codeAction_resolve with commands * feat(lsp): support for resolving code action command
* docs: misc #31996Justin M. Keyes2025-03-02
|
* fix(docs): update context type in `vim.lsp.LocationOpts.OnList`Maria José Solano2025-02-16
|
* fix(lsp): signature_help highlights wrong parameter #32382Shantanu Raj2025-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: With some LSP servers, `vim.lsp.buf.signature_help` (CTRL-s in insert-mode) highlights the first parameter regardless of the current cursor position. - On some lsps the `textDocument/signatureHelp` response only includes the `activeParameter` field on the `lsp.SignatureHelp` object. ```lua { { result = { activeParameter = 2, signatures = { { documentation = { kind = "markdown", value = "" }, label = "getBuyers(ctx context.Context, orderDB boil.ContextExecutor, supplierID string) ([]*BuyerWithLocation, error)", parameters = { { label = "ctx context.Context" }, { label = "orderDB boil.ContextExecutor" }, { label = "supplierID string" } } } } } } } ``` Solution: Ensure we retain this information before showing the signature information. Closes #32381
* docs: miscdundargoc2025-01-30
| | | | | | | | | Co-authored-by: Dustin S. <dstackmasta27@gmail.com> Co-authored-by: Ferenc Fejes <fejes@inf.elte.hu> Co-authored-by: Maria José Solano <majosolano99@gmail.com> Co-authored-by: Yochem van Rosmalen <git@yochem.nl> Co-authored-by: brianhuster <phambinhanctb2004@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix: resolve all remaining LuaLS diagnosticsLewis Russell2025-01-27
|
* fix(lsp): prefer `on_list` over `loclist` in default handlerEvgeni Chasnovski2025-01-23
| | | | | | | | | | Problem: setting `loclist = true` makes `on_list` being ignored. This was not a problem before, but with `vim.lsp.buf.document_symbol` using `loclist = true` as default it is needed to explicitly pass `loclist = false` in order to use custom `on_list`. Solution: prefer `on_list` over `loclist` and document the latter as taking effect only in the default handler.
* fix(lsp): document_symbol uses loclist by default #32070Yochem van Rosmalen2025-01-19
| | | | | | | | | | | Problem: Not able to open document symbols for different buffers Solution: Use the location list as default. To switch back to previous behavior (qflist): vim.lsp.buf.document_symbol({ loclist = false }) Fixes: #31832
* refactor: use nvim.foo.bar format for namespacesMaria José Solano2025-01-14
|
* fix(lsp): check if sig_help window is focusable when configuring cycle keymapMaria José Solano2024-12-29
|
* refactor: add vim._resolve_bufnrLewis Russell2024-12-07
|
* docs(lsp): update example, optional parameters #31299Yi Ming2024-11-28
|
* docs: more accurate typing for LSP references contextRiley Bruins2024-11-28
| | | | | | | **Problem:** The `context` parameter for `references()` is just typed as a table, which is unhelpful. **Solution:** Properly type it as an `lsp.ReferenceContext`!
* refactor(lsp): rename `offset_encoding` to `position_encoding` #31286Yi Ming2024-11-25
| | | | | | | | Problem: LSP spec uses the term "position encoding" where we say "offset encoding". Solution: - Rename it everywhere except `vim.lsp.Client.offset_encoding` (which would be breaking). - Mention "position encoding" in the documentation for `vim.lsp.Client.offset_encoding`.
* feat(lsp): deprecate non-method client functionsLewis Russell2024-11-20
| | | | | | | | | | | | | | Deprecated: - `client.request()` -> `client:request()` - `client.request_sync()` -> `client:request_sync()` - `client.notify()` -> `client:notify()` - `client.cancel_request()` -> `client:cancel_request()` - `client.stop()` -> `client:stop()` - `client.is_stopped()` `client:is_stopped()` - `client.supports_method()` -> `client:supports_method()` - `client.on_attach()` -> `client:on_attach()` Fixed docgen to link class fields to the full function doc.
* 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
* feat(lsp): highlight hover target/range #31110Riley Bruins2024-11-17
| | | | | | | | | | **Problem:** Despite the LSP providing the option for language servers to specify a range with a hover response (for highlighting), Neovim does not give the option to highlight this range. **Solution:** Add an option to `buf.hover()` which causes this range to be highlighted. Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
* feat(lsp): multi-client support for signature_helpLewis Russell2024-11-04
| | | | | Signatures can be cycled using `<C-s>` when the user enters the floating window.
* 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): correct hover result handling (#30995)notomo2024-10-30
| | | | | | | Problem: vim.lsp.buf.hover() displays "No information available" when client_id is not 1. Solution: use vim.tbl_isempty(tbl) instead of #tbl==0
* feat(lsp)!: multiple client support for vim.lsp.buf.hover()Lewis Russell2024-10-29
| | | | Deprecate `vim.lsp.handlers.hover` and `vim.lsp.handlers['textDocument/hover']`