| Commit message (Collapse) | Author | Age |
|
|
|
| |
This ensures workspace/didChangeConfiguration notification sent after init is correctly handled
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
refactor!: `vim.lsp.inlay_hint()` -> `vim.lsp.inlay_hint.enable()`
Problem:
The LSP specification allows inlay hints to include tooltips, clickable
label parts, and code actions; but Neovim provides no API to query for
these.
Solution:
Add minimal viable extension point from which plugins can query for
inlay hints in a range, in order to build functionality on top of.
Possible Next Steps
---
- Add `virt_text_idx` field to `vim.fn.getmousepos()` return value, for
usage in mappings of `<LeftMouse>`, `<C-LeftMouse>`, etc
|
|
|
|
|
| |
To reduce cross-chatter between modules and for https://github.com/neovim/neovim/issues/25272
Also preparing for https://github.com/neovim/neovim/issues/25714
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem:
- Notifications are missing from `lsp.Methods`.
- Need a way to represent `$/` prefixed methods.
Solution:
- Generate notifications.
- Use "dollar_" prefix for `$/` methods.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Neovim already passed `data` element from published diagnostic to code action, but failed to announce it in client capabilities.
Here is the test that shows that `data` element is returned by `vim.lsp.diagnostic.get_line_diagnostics()`:
https://github.com/neovim/neovim/blob/f56c1848091bb64c63b5bc25ec74bcbd2f52bdde/test/functional/plugin/lsp/diagnostic_spec.lua#L103-L115
and then `get_line_diagnostics()` is used to construct the context for code action request:
https://github.com/neovim/neovim/blob/f56c1848091bb64c63b5bc25ec74bcbd2f52bdde/runtime/lua/vim/lsp/buf.lua#L742
|
| |
|
|
|
| |
'hierarchicalWorkspaceSymbolSupport' is not part of the LSP Specification
|
|
|
|
|
| |
- fix lint / analysis warnings
- locations_to_items(): get default offset_encoding from active client
- character_offset(): get default offset_encoding from active client
|
|
|
|
|
| |
Since https://github.com/neovim/neovim/pull/23681 there is dynamic
registration support. We should use that for new features unless there
is a good reason to turn it off.
|
|
|
| |
initial support; public API left for a follow-up PR
|
| |
|
|
|
|
| |
The Nvim client does not yet support multiple offset encodings for
clients in the same buffer. Until it does, stick to utf-16 by default.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- `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
|
| |
|
|
|
|
| |
Now that we have builtin EditorConfig support and a formatting check in
CI, these are not necessary.
|
|
|
|
|
|
| |
The LSP spec supports two tags that can be added to diagnostics:
unnecessary and deprecated. Extend vim.diagnostic to be able to handle
these.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit 5732aa706c639b3d775573d91d1139f24624629c.
Causes editor to freeze in projects with many watcher registrations
|
| |
|
| |
|
|
|
|
|
| |
(#21665)
Co-authored-by: maozhongzhou <maozhongzhou@wps.cn>
|
|
|
|
|
|
| |
* credit to @smolck and @theHamsta for their contributions in laying the
groundwork for this feature and for their work on some of the helper
utility functions and tests
|
|
|
|
|
| |
`willSaveWaitUntil` allows servers to respond with text edits before
saving a document. That is used by some language servers to format a
document or apply quick fixes like removing unused imports.
|
|
|
|
| |
To illustrate a use-case this also changes `window/showMessageRequest`
to use `vim.ui.select`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
LSP client provides bogus capabilities in CodeActionKind.
LSP logs show this in the "initialize" message:
codeActionKind = { valueSet = { "Empty", "QuickFix",
"Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite",
"Source", "SourceOrganizeImports", "", "quickfix", "refactor",
"refactor.extract", "refactor.inline", "refactor.rewrite", "source",
"source.organizeImports" }
Solution:
Only the values from the CodeActionKind table should be presented, not also the
keys.
fix #20657
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Neovim implements `workspace/configuration`
It should set the capability accordingly.
From https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#clientCapabilities:
/**
* The client supports `workspace/configuration` requests.
*
* @since 3.6.0
*/
configuration?: boolean;
|
|
|
|
| |
* reformat Lua runtime to make lint CI pass
* reduce max line length to 100
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat(lsp)!: remove capabilities sanitization
Users must now access client.server_capabilities which matches the same
structure as the protocol.
https://microsoft.github.io/language-server-protocol/specification
client.resolved_capabilities is no longer used to gate capabilities, and
will be removed in a future release.
BREAKING CHANGE
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement two new options to vim.lsp.buf.code_action():
- filter (function): predicate taking an Action as input, and returning
a boolean.
- apply (boolean): when set to true, and there is just one remaining
action (after filtering), the action is applied without user query.
These options can, for example, be used to filter out, and automatically
apply, the action indicated by the server to be preferred:
vim.lsp.buf.code_action({
filter = function(action)
return action.isPreferred
end,
apply = true,
})
Fix #17514.
|
| |
|
|
|
| |
Closes https://github.com/neovim/neovim/issues/15339 and https://github.com/neovim/neovim/issues/15828
|
|
|
|
|
|
|
| |
Declaration, type-definition, and implementation capabilities were
previously disabled if the client received table output from the server
capabilities. The workDoneProgress capability is sent for many servers
for all supported capabilities as part of this table. Default to setting
capability to table instead of false.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The official developer documentation in in :h dev-lua-doc specifies to
use "--@" for special/magic tokens. However, this format is not
consistent with EmmyLua notation (used by some Lua language servers) nor
with the C version of the magic docstring tokens which use three comment
characters.
Further, the code base is currently split between usage of "--@",
"---@", and "--- @". In an effort to remain consistent, change all Lua
magic tokens to use "---@" and update the developer documentation
accordingly.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Fixes https://github.com/neovim/neovim/issues/13989
See https://github.com/microsoft/language-server-protocol/issues/288
|
|
|
| |
pyright (possibly others) does not send any hint diagnostics if we do not have tagSupport in PublishDiagnosticsClientCapabilities. This PR just adds them.
|
|
|
|
|
| |
handlers (#13638)
Several language servers are incorrectly invoking handlers which are not yet implemented in core.
|
|
|
|
| |
Heavily inspired by https://github.com/nvim-lua/lsp-status.nvim.
listen to the LspProgressUpdate event to update your statusline.
|