| Commit message (Collapse) | Author | Age |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Part of the `pending_change` closure in the `changetracking.prepare` was
a bit confusing because it has access to `bufnr` and `uri` but it could
actually contain pending changes batched for multiple buffers.
(We accounted for that by grouping `pending_changes` by a `uri`, but
it's not obvious what's going on)
This commit changes the approach to do everything per buffer to avoid
any ambiguity.
It also brings the debounce/no-debounce a bit closer together: The
only difference is now whether a timer is used or if it is triggered
immediately
|
| |
|
|
|
|
|
| |
This allows the user to detach an active buffer from the language
client. If no clients remain attached to a buffer, the on_lines callback
is used to cancel nvim_buf_attach.
|
|
|
|
|
| |
* send vim.NIL instead of not sending workspaceFolders
* read fallback rootPath and rootUri from workspaceFolders
* update documentation
|
|
|
|
|
|
|
|
|
| |
If a LSP server sent a workspace edit containing a rename the buffers
file name changed without the server receiving a close notification for
the old buffer and without the client properly re-attaching on the new
file.
This affected `Move` code-actions in nvim-jdtls, but also
`vim.lsp.buf.rename` on a class level.
|
|
|
|
|
|
| |
* vim.ui.input is an overridable function that prompts for user input
* take an opts table and the `on_confirm` callback, see `:help vim.ui.input` for more details
* defaults to a wrapper around vim.fn.input(opts)
* switches the built-in client's rename handler to use vim.ui.input by default
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Closes https://github.com/neovim/neovim/issues/15174
Instead of invoking handlers with unsupported methods, pre-compute which
clients support a given method and only notify the user if no clients
support the given method.
|
|
|
| |
Fixes test regression introduced in https://github.com/neovim/neovim/pull/15262
|
| |
|
|
|
|
|
|
|
|
|
|
| |
N, W, S, E are all inclusive, i.e., always anchor to the exact corner of the
window (including border). This line may also need change in this case (change
0 to -1):
This is most consistent and easiest to reason about, especially with GUIs whose
border do not need to have width/height of 1/1 in cell units.
Fix #15789
|
|
|
|
| |
- fix tests which accidentally depended on previous session
|
|
|
| |
Closes https://github.com/neovim/neovim/issues/15339 and https://github.com/neovim/neovim/issues/15828
|
|
|
|
|
| |
This builds on https://github.com/neovim/neovim/pull/14112 and closes
https://github.com/neovim/neovim/issues/12326
|
|
|
|
|
|
|
|
|
|
|
| |
This is mostly motivated by https://github.com/neovim/neovim/issues/12326
Client side commands might need to access the original request
parameters.
Currently this is already possible by using closures with
`vim.lsp.buf_request`, but the global handlers so far couldn't access
the request parameters.
|
|
|
|
|
| |
- Fix the cursor position after applying TextEdits
- Support reversed range of TextEdit
- Invoke nvim_buf_set_text one by one
|
|
|
|
|
|
|
|
|
|
|
| |
This generalizes diagnostic handling outside of just the scope of LSP.
LSP clients are now a specific case of a diagnostic producer, but the
diagnostic subsystem is decoupled from the LSP subsystem (or will be,
eventually).
More discussion at [1].
[1]: https://github.com/neovim/neovim/pull/15585
|
|
|
| |
Fixes #15522
|
| |
|
| |
|
|\
| |
| | |
feat(lsp)!: change handler signature
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, the handler signature was:
function(err, method, params, client_id, bufnr, config)
In order to better support external plugins that wish to extend the
protocol, there is other information which would be advantageous to
forward to the client, such as the original params of the request that
generated the callback.
In order to do this, we would need to break symmetry of the handlers, to
add an additional "params" as the 7th argument.
Instead, this PR changes the signature of the handlers to:
function(err, result, ctx, config)
where ctx (the context) includes params, client_id, and bufnr. This also leaves
flexibility for future use-cases.
BREAKING_CHANGE: changes the signature of the built-in client handlers, requiring
updating handler calls
|
|/ |
|
|\
| |
| | |
test(lsp): disable finicky test when TEST_SKIP_FRAGILE is set
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
too old now, can be confusing
|
| |
|
| |
|
|\
| |
| | |
lsp: handle case where CompletionItem.insertTextFormat is nil
|
| |
| |
| |
| | |
* Update tests to use explicit insertTextFormat for snippets
|
| |
| |
| |
| | |
References https://github.com/neovim/neovim/issues/14571
|
|/
|
|
| |
This reverts commit 8885ea7f244ee49b0018dc57be84917ea7886c2d.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This commit prevents two things regarding the tagstack and jumping to
locations:
- Pushing the same item twice in a row
- Pushing an item where the destination is the same as the source
Both prevent having to press CTRL-T additional times just to pop items
that don't make the cursor move.
|
|
|
|
|
| |
The rpc layer normalizes `vim.NIL` to `nil`, so the scenario tested
should never happen.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were a couple of reports of "Buffer X newer than edits" problems.
We first assumed that it is incorrect for a server to send 0 as a
version - and stated that they should send a `null` instead, given that
in the specification the `textDocument` of a `TextDocumentEdit` is a
`OptionalVersionedTextDocumentIdentifier`.
But it turns out that this was a change in 3.16, and in 3.15 and earlier
versions of the specification it was a `VersionedTextDocumentIdentifier`
and language servers didn't have a better option than sending `0` if
they don't keep track of the version numbers.
So this changes the version check to always accept `0` values.
See
- https://github.com/neovim/neovim/issues/12970
- https://github.com/neovim/neovim/issues/14256
- https://github.com/haskell/haskell-language-server/pull/1727
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
lsp: add incremental text synchronization
|