| Commit message (Collapse) | Author | Age |
|
|
| |
* preserve fields from LSP diagnostics via adding a user_data table to the diagnostic, which can hold arbitrary data in addition to the lsp diagnostic information.
|
|
|
|
|
| |
- Fix the cursor position after applying TextEdits
- Support reversed range of TextEdit
- Invoke nvim_buf_set_text one by one
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These links were actually defined backwards: the highlight groups
actually being used for display are the new "Diagnostic*" groups, so
linking the old "LspDiagnostics*" groups to these does absolutely
nothing, since there is nothing actually being highlighted with the
LspDiagnostics* groups.
These links were made in an attempt to preserve backward compatibility
with existing colorschemes. We could reverse the links to maintain this
preservation, but then that disallows us from actually defining default
values for the new highlight groups.
Instead, just remove the links and be done with the old LspDiagnostics*
highlight groups.
This is not technically a breaking change: the breaking change already
happened in #15585, but this PR just makes that explicit.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add two new methods to allow diagnostics to be disabled (and re-enabled)
in the current buffer. When diagnostics are disabled they are simply not
displayed to the user, but they are still sent by the server and
processed by the client.
Disabling diagnostics can be helpful in a number of scenarios. For
example, if one is working on a buffer with an overwhelming amount of
diagnostic warnings it can be helpful to simply disable diagnostics
without disabling the LSP client entirely. This also allows users more
flexibility on when and how they may want diagnostic information to be
displayed. For example, some users may not want to display diagnostic
information until after the buffer is first written.
|
|/ |
|
|
|
|
| |
too old now, can be confusing
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Makes it easier to re-use the logic to populate the quickfix list
instead of the location list.
|
|\
| |
| | |
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.
|
| |
|
|
|
|
|
|
|
| |
Update runtime files.
https://github.com/vim/vim/commit/ebdf3c964a901fc00c9009689f7cfda478342c51
Omit vim9.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
| |
| |
| |
| | |
* Implementation derived from and validated by vim-lsc authored by Nate
Bosch
|
|/
|
|
|
|
|
| |
before, calling vim.schedule() from inside an event would execute
the scheduled callback immediately after this event without
checking for user input in between. Break event processing
whenever user input or an interrupt is available.
|
|
|
|
|
| |
Fixes https://github.com/neovim/neovim/issues/13989
See https://github.com/microsoft/language-server-protocol/issues/288
|
|
|
|
|
| |
vim.lsp.callbacks was deprecated a few months ago. This is a cleanup before the release.
Use vim.lsp.handlers instead.
|
|
|
|
|
|
| |
`lines` can be empty, in which case `#lines[#lines]` failed with an
error:
lsp/util.lua:214: attempt to get length of a nil value
|
|
|
|
|
|
|
|
| |
* lsp: client stop cleanups
* Add diagnostic clearing to client.stop() method used by nvim-lspconfig
* Clear diagnostic cache to prevent stale diagnostics on client restart
* lsp: Add test for vim.lsp.diagnostic.reset
|
| |
|
|
|
|
|
|
|
|
|
| |
The `workspace/configuration` handler could fail with the following
error if `config.settings` is nil:
runtime/lua/vim/lsp/util.lua:1432: attempt to index local 'settings' (a nil value)"
This ensures that `config.settings` is always initialized to an empty
table.
|
|
|
|
|
|
|
|
|
|
|
| |
* lsp: Add severity_limit for other diagnostics
* docs and tests
* fix: lint
* Add to other types
* fix: lint
|
|
|
|
|
|
|
| |
* fix: Allow subsequent text document edits to pass
* fixup: cleaner code
* add tests
|
| |
|