aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
Commit message (Collapse)AuthorAge
* fix(lsp): advertise workspace.didChangeConfiguration capability (#26028)Chris Simon2023-11-13
| | | | This ensures workspace/didChangeConfiguration notification sent after init is correctly handled
* feat(lsp)!: vim.lsp.inlay_hint.get(), enable(), is_enabled() #25512LW2023-11-12
| | | | | | | | | | | | | | | | | | 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
* refactor(lsp): move completion logic into _completion moduleMathias Fussenegger2023-10-21
| | | | | 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
* feat(lsp): add snippet API (#25301)Maria José Solano2023-10-21
|
* fix(gen_lsp.lua): no notifications in lsp.Methods #24530Raphael2023-08-03
| | | | | | | | | Problem: - Notifications are missing from `lsp.Methods`. - Need a way to represent `$/` prefixed methods. Solution: - Generate notifications. - Use "dollar_" prefix for `$/` methods.
* feat(gen_lsp.lua): sort by name, handle failure #24504Justin M. Keyes2023-08-01
|
* feat(gen_lsp.lua): protocol.Methods #24504mathew2023-08-01
|
* fix(lsp): announce publishDiagnostics.dataSupport (#24442)Bruce Weirdan2023-07-24
| | | | | | | | | | | 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
* feat(lsp): implement textDocument/diagnostic (#24128)Chris AtLee2023-07-20
|
* fix(lsp): remove unknown LSP protocol property (#24345)Techatrix2023-07-14
| | | 'hierarchicalWorkspaceSymbolSupport' is not part of the LSP Specification
* fix(lsp): lint warnings, default offset_encoding #24046Raphael2023-07-01
| | | | | - fix lint / analysis warnings - locations_to_items(): get default offset_encoding from active client - character_offset(): get default offset_encoding from active client
* feat(lsp): opt-in to dynamicRegistration for inlay hints (#24102)Mathias Fußenegger2023-06-22
| | | | | 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.
* feat(lsp): add handlers for inlay hints (#23736)Chinmay Dalal2023-06-11
| | | initial support; public API left for a follow-up PR
* fix(lsp): reduce diagnostics and add more types (#23948)Lewis Russell2023-06-07
|
* fix(lsp): use only utf-16 in default client positionEncodings (#23903)Gregory Anders2023-06-05
| | | | 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.
* feat(lsp): include positionEncodings in default client capabilitiesGregory Anders2023-06-01
|
* feat(lsp): initial support for dynamic capabilities (#23681)Folke Lemaitre2023-05-28
| | | | | | | | | | | | - `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
* feat(lsp): enable workspace/didChangeWatchedFiles by default (#23190)Jon Huhn2023-04-22
|
* refactor: remove modelines from Lua filesGregory Anders2023-04-13
| | | | Now that we have builtin EditorConfig support and a formatting check in CI, these are not necessary.
* feat(diagnostic): add support for tagsLewis Russell2023-03-30
| | | | | | The LSP spec supports two tags that can be added to diagnostics: unnecessary and deprecated. Extend vim.diagnostic to be able to handle these.
* refactor(lsp): remove _resolve_capabilities_compat (#22628)Raphael2023-03-11
|
* feat(lsp): implement workspace/didChangeWatchedFiles (#22405)Jon Huhn2023-03-05
|
* fix(lsp): fix some type annotations (#22397)Mathias Fußenegger2023-02-25
|
* Revert "feat(lsp): implement workspace/didChangeWatchedFiles (#21293)"Mathias Fussenegger2023-02-25
| | | | | | This reverts commit 5732aa706c639b3d775573d91d1139f24624629c. Causes editor to freeze in projects with many watcher registrations
* feat(lsp): implement workspace/didChangeWatchedFiles (#21293)Jon Huhn2023-02-25
|
* feat(lsp): add triggerKind option for vim.lsp.buf.code_action (#21905)kishii2023-01-21
|
* fix(lsp): correct callHierarchy capability to fix lsp.buf.incoming_calls() ↵2023-01-06
| | | | | (#21665) Co-authored-by: maozhongzhou <maozhongzhou@wps.cn>
* feat(lsp): initial support for semantic token highlightingJohn Drouhard2022-12-08
| | | | | | * 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
* feat(lsp): support willSave & willSaveWaitUntil capability (#21315)Mathias Fußenegger2022-12-08
| | | | | `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.
* feat(lsp): run handler in coroutine to support async response (#21026)Mathias Fußenegger2022-11-19
| | | | To illustrate a use-case this also changes `window/showMessageRequest` to use `vim.ui.select`
* fix(lsp): reporting bogus capabilities in CodeActionKind #20678David Hotham2022-10-16
| | | | | | | | | | | | | | | | 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
* feat(lsp): support window/showDocument (#19977)lvimuser2022-10-08
|
* fix(lsp): set workspace.configuration capability (#19548)Mathias Fußenegger2022-07-27
| | | | | | | | | | | | | 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;
* refactor(lua): reformat with stylua 0.14.0 (#19264)Christian Clason2022-07-07
| | | | * reformat Lua runtime to make lint CI pass * reduce max line length to 100
* chore: format runtime with styluaChristian Clason2022-05-09
|
* chore(lsp): remove capabilities sanitization (#17814)Michael Lingelbach2022-04-30
| | | | | | | | | | | | | | | | * 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>
* feat(lsp): options to filter and auto-apply code actions (#18221)Fredrik Ekre2022-04-30
| | | | | | | | | | | | | | | | | | | 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.
* docs(lsp): fix resolve_capabilities docstring (#16577)Gregory Anders2021-12-08
|
* feat(lsp): add codeAction/resolve support (#15818)Mathias Fußenegger2021-09-28
| | | Closes https://github.com/neovim/neovim/issues/15339 and https://github.com/neovim/neovim/issues/15828
* fix(lsp): enable additional capabilities (#15470)Michael Lingelbach2021-08-23
| | | | | | | 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.
* docs: make Lua docstrings consistent #15255Gregory Anders2021-08-22
| | | | | | | | | | | | 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.
* feat(lsp): highlight active parameter in signature help (#15018)Folke Lemaitre2021-07-07
|
* lsp: Add support for delete workspaceEdit resource operationMathias Fussenegger2021-03-18
|
* lsp: Add support for create workspaceEdit resource operationMathias Fussenegger2021-03-18
|
* lsp: Add support for file rename via workspaceEditMathias Fussenegger2021-03-18
|
* lsp: Resolve codeLense server capabilities (#14056)Josa Gesell2021-03-10
|
* LSP: Resolve text_document_save capability according to specMathias Fussenegger2021-02-25
| | | | | Fixes https://github.com/neovim/neovim/issues/13989 See https://github.com/microsoft/language-server-protocol/issues/288
* LSP: Add diagnostic tags to client capabilities (#13578)Timmy Xiao2021-01-05
| | | pyright (possibly others) does not send any hint diagnostics if we do not have tagSupport in PublishDiagnosticsClientCapabilities. This PR just adds them.
* lsp: Disable capabilities not currently supported by language client ↵Michael Lingelbach2020-12-30
| | | | | handlers (#13638) Several language servers are incorrectly invoking handlers which are not yet implemented in core.
* lsp: add $/progress report (#13294)Matthieu Coudron2020-12-20
| | | | Heavily inspired by https://github.com/nvim-lua/lsp-status.nvim. listen to the LspProgressUpdate event to update your statusline.