aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp
Commit message (Collapse)AuthorAge
...
| * fix(lint): remove unused parameters from deprecated functionsGregory Anders2021-09-16
| |
| * refactor: move vim.lsp.diagnostic to vim.diagnosticGregory Anders2021-09-15
| | | | | | | | | | | | | | | | | | | | | | 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
* | feat(lsp): improve logging (#15636)Michael Lingelbach2021-09-15
|/ | | | | | | * Simplify rpc encode/decode messages to rpc.send/rcp.receive * Make missing handlers message throw a warning * Clean up formatting style in log * Move all non-RPC loop messages to trace instead of debug * Add format func option to log to allow newlines in per log entry
* fix(lsp): correctly parse LSP snippets #15579hrsh7th2021-09-14
| | | Fixes #15522
* docs #15625Justin M. Keyes2021-09-10
| | | | | | | | | | | fix #12261 fix #15536 fix #15623 fix #15572 ref #14244 ref #15034 close #15555 close #14957
* feat(lsp): support textDocument/prepareRename (#15514)Zi How Poh2021-09-08
|
* chore(lsp): fix formatting in vim.lsp.log (#15596)Michael Lingelbach2021-09-07
|
* feat(lsp): add warning message for large log sizeMichael Lingelbach2021-09-07
|
* feat(lsp): add lsp healthcheckMichael Lingelbach2021-09-07
| | | | | Add healthcheck for language server client, currently only checks logging status.
* fix(lsp): adapt codelens resolve to handler signature change (#15578)Mathias Fußenegger2021-09-06
| | | Follow up to https://github.com/neovim/neovim/pull/15504
* fix(lsp): update workspace/applyEdit handler signature (#15573)Jose Alvarez2021-09-05
|
* Merge pull request #15504 from mjlbach/feat/change-handler-signatureMichael Lingelbach2021-09-05
|\ | | | | feat(lsp)!: change handler signature
| * feat(lsp)!: change handler signatureMichael Lingelbach2021-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | docs(lsp): remove private lsp.diagnostic functions from docs (#15541)Mathias Fußenegger2021-09-01
| | | | | | | | Both `apply_to_diagnostic_items` and `show_diagnostics` are local functions and cannot be called by users.
* | docs(lsp): document codelens.get bufnr parameter (#15540)Mathias Fußenegger2021-09-01
| | | | | | Alternative to https://github.com/neovim/neovim/pull/15224
* | feat(lsp): get_border_size(): support repeating border char list #15474zeertzjq2021-08-27
|/
* 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): jump to diagnostics by position (#14795)Zi How Poh2021-08-19
|
* fix(lsp): properly handle `nil` lines when trimming empty lines (#15325)Andrea Cappuccio2021-08-10
|
* fix(lsp): floating popup should take offset_x into account when positioning ↵Hans Pinckaers2021-08-09
| | | | (#15297)
* docs: Add some references to LSP specification (#15321)max3975742021-08-09
|
* fix(lsp): prevent duplicate lines seperated by newlines (#15284)Folke Lemaitre2021-08-06
|
* refactor: remove remaining references to nvim_buf_set_virtual_textGregory Anders2021-08-03
|
* fix(lsp): Include client name in handler error messages (#15227)Mathias Fußenegger2021-07-31
| | | Makes it easier to tell with language server caused an error.
* feat(lsp): implement vim.lsp.diagnostic.redraw() (#15203)Gregory Anders2021-07-29
| | | | | | | | | | | | | Add a new function to redraw diagnostics from the current diagnostic cache, without receiving a "publishDiagnostics" message from the server. This is already being done in two places in the Lua stdlib, so this function unifies that functionality in addition to providing it to third party plugins. An example use case for this could be a command or key-binding for toggling diagnostics virtual text. The virtual text configuration option can be toggled using `vim.lsp.with` followed by `vim.lsp.diagnostic.redraw()` to immediately redraw the diagnostics with the updated setting.
* feat(lsp): make list handlers configurable (#15199)Gregory Anders2021-07-26
| | | | | | | | | | | | The handlers for textDocument/references, textDocument/documentSymbol, and workspace/symbol open their results in the quickfix list by default and are not configurable. They are also incompatible with `vim.lsp.with` as they do not accept a configuration parameter. Add a `config` parameter to the handler for these three messages which allows them to be configured with `vim.lsp.with`. Additionally, add a new configuration option 'loclist' that, when true, causes these handlers to open their results in the location list rather than the quickfix list.
* lsp: add vim.lsp.diagnostic.set_qflist() function (#14831)Marc Jakobi2021-07-22
| | | | * Add vim.lsp.diagnostic.set_qflist() function * replaces opts.open_loclist with unified opts.open
* fix(lsp): allow diagnostic.clear to accept nil bufnr (#15137)Gregory Anders2021-07-19
| | | | | | | Passing `nil` is equivalent to passing 0, i.e. it simply uses the current buffer number. This fixes a bug when vim.lsp.diagnostic.disable() is called without arguments.
* feat(lsp): allow diagnostics to be disabled for a buffer (#15134)Gregory Anders2021-07-19
| | | | | | | | | | | | | | | 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.
* feat(lsp): allow configuring zindex for floating windows (#15086)rayx2021-07-19
|
* feat: aggregate code actions from all clients (#15121)Folke Lemaitre2021-07-18
|
* doc(lsp): various small fixes (#15113)Ido Ariel2021-07-17
| | | | | | - remove incorrect usage of docstrings - fix make_formatting_params return type documentation to 'DocumentFormattingParams' - make progress_handler private - fix links
* fix(lsp): pass bufnr for async formatting (#15084)Michael Lingelbach2021-07-14
| | | | | | the `textDocument/rangeFormatting` nad `textDocument/formatting` did not pass bufnr to apply_text_edits, meaning edits were applied to the user's currently active buffer. This could result in text being applied to the wrong buffer.
* fix(lsp): avoid ipairs on non-sequential tables (#15059)Michael Lingelbach2021-07-11
| | | | | | | | | | | | | | | | | | | | ipairs terminates on the first nil index when iterating over table keys: for i,k in ipairs( {[1] = 'test', [3] = 'test'} ) do print(i, k) end prints: 1 test Instead, use pairs which continues iterating over the entire table: for i,k in pairs( {[1] = 'test', [3] = 'test'} ) do print(i, k) end prints: 1 test 3 test
* fix(lsp): Ensure human readable errors are printedMathias Fussenegger2021-07-11
| | | | | | | | | | `return err_message(tostring(err))` caused errors to be printed as `table: 0x123456789` instead of showing the error code and error message. This also removes some `if err` blocks that never got called because at the end of `handlers.lua` all the handlers are wrapped with logic that adds generic error handling.
* fix(lsp): Ensure users get feedback on references/symbols errors or empty ↵Mathias Fussenegger2021-07-11
| | | | | | | | | results Relates to https://github.com/neovim/neovim/issues/15050 Users should get some indication if there was an error or an empty result.
* fix(lsp): Add separator between codelens in virttext (#15049)Mathias Fußenegger2021-07-10
| | | | | | | | | | | | Before: Lens1Lens2 After: Lens1 | Lens2 Fixes https://github.com/neovim/neovim/issues/15048
* fix(lsp): correctly check for windows in lsp logger (#14954)Oliver Marriott2021-07-10
|
* feat(lsp): Make line diagnostics display prettierMathias Fussenegger2021-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | Adds indentation that matches the number prefix to ensure diagnostic messages spawning multiple lines align. Before: Diagnostics: 1. • Variable not in scope: red :: t0 -> t • Perhaps you meant one of these: ‘rem’ (imported from Prelude), ‘read’ (imported from Prelude), ‘pred’ (imported from Prelude) 2. • Variable not in scope: repeDoubleColon :: [Char] -> t0 • Perhaps you meant ‘replaceDoubleColon’ (line 32) After: Diagnostics: 1. • Variable not in scope: red :: t0 -> t • Perhaps you meant one of these: ‘rem’ (imported from Prelude), ‘read’ (imported from Prelude), ‘pred’ (imported from Prelude) 2. • Variable not in scope: repeDoubleColon :: [Char] -> t0 • Perhaps you meant ‘replaceDoubleColon’ (line 32)
* fix(lsp): support duplicate params in signature help (#15032)Folke Lemaitre2021-07-09
|
* fix(lsp): restore diagnostics extmarks that were moved to the last edit line ↵Folke Lemaitre2021-07-08
| | | | (#15023)
* feat(lsp): highlight active parameter in signature help (#15018)Folke Lemaitre2021-07-07
|
* fix(lsp): restore diagnostics extmarks on buffer changes (#15011)Folke Lemaitre2021-07-07
|
* fix(lsp): prevent double <text> for cached plaintext markupFolke Lemaitre2021-07-05
|
* Fixed +1 -1 in util.lua (#14913)jimman20032021-06-26
| | | No point in adding and then subtracting I believe ;)
* fix(lsp): render the last line in stylize_markdownFolke Lemaitre2021-06-25
|
* style(lsp): make get_markdown_fences privateFolke Lemaitre2021-06-25
|
* Merge pull request #14904 from mfussenegger/nil-message-callbacksMichael Lingelbach2021-06-25
|\ | | | | fix(lsp): Handle nil message_callbacks
| * fix(lsp): Handle nil message_callbacksMathias Fussenegger2021-06-25
| | | | | | | | | | | | | | | | | | | | The `onexit` handler could set `message_callbacks` to `nil` within the luv event loop while the mainloop runs a function that tries to access `message_callbacks`. This adds some checks to prevent errors in that case. Fixes https://github.com/neovim/neovim/issues/14863