| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
`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
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Problem: When expanding a completion item that contains a multi-line word, the word is not deleted correctly.
Solution: If the word contains a line break, delete the text from Context.cursor to the current cursor position.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Problem: autotrigger option of vim.lsp.completion.enable() would trigger
all clients, as long as it matched at least one client's
triggerCharacters.
Solution: trigger only the clients with triggerCharacters matching the
character. overtriggering still happens if any client returns
isIncomplete=true (this case is more involved).
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
1. Open a relatively large file (so the server needs some time to
process the request).
2. Then immediately execute `:bdelete`.
3. Once the request is completed, the handler will obtain the bufstate
of a buffer already unloaded.
Error executing vim.schedule lua callback: ...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:119: assertion failed!
stack traceback:
[C]: in function 'assert'
...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:119: in function 'multi_handler'
...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:140: in function 'handler'
...HEAD-c137841_1/share/nvim/runtime/lua/vim/lsp/client.lua:669: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Solution:
On detach, cancel all pending textDocument_foldingRange requests.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: There is no check for buffer validity before processing
semantic tokens response. This can lead to `Invalid buffer id` error
if processing request takes a long time and the buffer is wiped out.
For example, this can happen after by accident navigating to a buffer
from different project which leads to first loading project's
workspace and *then* processing semantic tokens. During that time
a buffer can be wiped out, as navigation to it was by accident.
Solution: Add extra check for buffer validity before processing semantic
tokens response.
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
vim.lsp.completion.enable(true, client.id, bufnr)
vim.lsp.completion.enable(false, client.id, bufnr)
Error detected while processing LspDetach Autocommands for "*":
Error executing lua callback: …/lsp/completion.lua:701: Vim:E367: No such group: "vim/lsp/completion-22"
stack traceback:
[C]: in function 'nvim_del_augroup_by_name'
…/lsp/completion.lua:701: in function 'disable_completions'
…/lsp/completion.lua:724: in function 'enable'
Solution:
Delete the correct augroup.
|
|
|
|
|
|
|
|
|
| |
Problem:
The filetype for the floating window buffer is being set before its context is fully initialized.
This results in `FileType` events not receiving the correct context.
Solution:
Set the filetype after the floating preview window and its buffer variables are
fully configured to ensure proper context is provided.
|
|
|
|
|
|
|
|
| |
Follow up to https://github.com/neovim/neovim/pull/32072
If there is no prefix (e.g. at the start of word boundary or a line), it
always used the `filterText` because the `match` function always
returned false.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
With language servers like lemminx, completing xml tags like `<mo` first
shows the right candidates (`modules`) but after typing `d` the
candidates disappear.
This is because the server returns:
[...]
filterText = "<module",
label = "module",
textEdit = {
newText = "<module>$1</module>$0",
Which resulted in `module` being used as `word`, and `module` doesn't
match the prefix `<mo`. Typing `d` causes the `complete()` filtering
mechanism to kick in and remove the entry.
Solution:
Use `<module` from the `filterText` as `word` if the textEdit/label
heuristic doesn't match.
|
|
|
|
| |
Ref https://github.com/neovim/neovim/discussions/32015
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem:
The floating window for hover and signature help always cuts off a few lines,
because the `_make_floating_popup_size` function counts empty lines as having
zero height.
Solution:
Ensure the height is at least 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Co-authored-by: Axel <axelhjq@gmail.com>
Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
Co-authored-by: Daiki Noda <sys9kdr@users.noreply.github.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: Jean-Jacq du Plessis <1030058+jj-du-plessis@users.noreply.github.com>
Co-authored-by: Juan Giordana <juangiordana@gmail.com>
Co-authored-by: Lincoln Wallace <locnnil0@gmail.com>
Co-authored-by: Matti Hellström <hellstrom@scm.com>
Co-authored-by: Steven Locorotondo <steven.locorotondo@justeattakeaway.com>
Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
Co-authored-by: glepnir <glephunter@gmail.com>
Co-authored-by: ifish <fishioon@live.com>
|
| |
|
|\ |
|
| | |
|
|/
|
|
| |
Problem: health can not shown in a floating window
Solution: add g:health variable
|
|
|
|
|
| |
Problem: open_floating_preview() may be hidden behind current window if
that is floating and has a higher zindex.
Solution: Open floating preview with zindex higher than current window.
|
|
|
|
|
|
|
| |
* Cancel watcher in the "force" case.
* Cancel watcher outside the async callback. It seems nvim doesn't wait
async jobs on quitting, leaving detached inotifywait processes.
* Clean up cancelling callbacks.
|
|
|
|
|
|
|
|
|
|
| |
Allows to retrieve the configuration as it will be used by `lsp.enable`
- including the parts merged from `*` and rtp.
This is useful for explicit startup control
(`vim.lsp.start(vim.lsp.config[name])`)
Closes https://github.com/neovim/neovim/issues/31640
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
Language server version information missing from `:checkhealth vim.lsp`.
Solution:
Store `InitializeResult.serverInfo.version` from the `initialize`
response and display for each client in `:checkhealth vim.lsp`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Design goals/requirements:
- Default configuration of a server can be distributed across multiple sources.
- And via RTP discovery.
- Default configuration can be specified for all servers.
- Configuration _can_ be project specific.
Solution:
- Two new API's:
- `vim.lsp.config(name, cfg)`:
- Used to define default configurations for servers of name.
- Can be used like a table or called as a function.
- Use `vim.lsp.confg('*', cfg)` to specify default config for all
servers.
- `vim.lsp.enable(name)`
- Used to enable servers of name. Uses configuration defined
via `vim.lsp.config()`.
|
|
|
|
|
| |
Not essential, but adds robustness and hardening for future
changes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Diagnostics and inlay hints can be expensive to calculate, and we
shouldn't stack them as this can cause noticeable lag.
Solution:
Check for duplicate inflight requests and cancel them before issuing a new one.
This ensures that only the latest request is processed, improving
performance and preventing potential conflicts.
|
| |
|
|
|
|
|
|
| |
Problem: The folding_range request method assumes that the client
supports the method
Solution: Add a capability guard to the call
|
|
|
|
|
|
|
|
| |
Problem:
LSP module has multiple "start" interfaces.
Solution:
- Enhance vim.lsp.start
- Deprecate vim.lsp.start_client
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
| |
**Problem:** The `context` parameter for `references()` is just typed as
a table, which is unhelpful.
**Solution:** Properly type it as an `lsp.ReferenceContext`!
|
|
|
|
|
|
| |
Problem: The warning message is the same in different functions.
It is not convenient to locate the specific function name
Solution: add function name in warning message
|
|
|
| |
Co-authored-by: Jesse <github@jessebakker.com>
|
|
|
|
|
|
|
|
| |
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`.
|
|
|
|
|
|
|
|
| |
Problem: floaing preview window can be closed by some
ex commands like `only` `fclose` which will not clean the bufvar
Solution: use WinClosed event with floating_winnr for clean
bufnr, and add test cases for vim.lsp.util.open_floating_preview
|