aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp.lua
Commit message (Collapse)AuthorAge
...
| * | | lsp: clear did_save handler autocommand on each attachMichael Lingelbach2021-03-31
| |/ /
* / / lsp: fix textDocument/workspaceSymbol -> workspace/symbolMichael Lingelbach2021-03-31
|/ /
* | lsp: use utf-8 when utf-16 not requestedMichael Lingelbach2021-03-30
| |
* | lsp: Force re-display of diagnostics when opening a fileTJ DeVries2021-03-22
| |
* | lsp: Use incremental sync by defaultMathias Fussenegger2021-03-11
| | | | | | | | | | | | | | | | | | With the new implementation added in https://github.com/neovim/neovim/pull/14079 I think this is now working well enough to enable it by default. There are high CPU usage issues popping up now and then and they might at least partially be related to the full-text sync.
* | lsp: Resolve codeLense server capabilities (#14056)Josa Gesell2021-03-10
| |
* | lsp: get_language_id (#14092)TJ DeVries2021-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow specifying a languageId for a lsp For some languages the filetype might not match the languageId the language server accepts. In these cases the config for the language server can contain a function which gets the current buffer and filetype and returns a languageId. When it isn't provided the filetype is used instead. Example: ```lua require'lspconfig'.sourcekit.setup{ get_language_id = function(bufnr, ft) return 'swift' end; } ``` Closes #13093 * lsp: Change to get_language_id Co-authored-by: Jan Dammshäuser <mail@jandamm.de>
* | lsp: fix endline such that it cannot point outside the buffer rangeMichael Lingelbach2021-03-10
| |
* | lsp: add incremental text synchronizationMichael Lingelbach2021-03-09
| | | | | | | | | | * Implementation derived from and validated by vim-lsc authored by Nate Bosch
* | lsp: don't invoke vim.notify on sigterm of language serverMichael Lingelbach2021-03-04
| |
* | lsp: invoke vim.notify when client exits with code or signal other than 0Michael Lingelbach2021-03-04
| |
* | lsp: remove deprecated references to 'callbacks' (#13945)Matthieu Coudron2021-02-23
| | | | | | | | | | vim.lsp.callbacks was deprecated a few months ago. This is a cleanup before the release. Use vim.lsp.handlers instead.
* | lsp: client stop cleanups (#13877)Michael Lingelbach2021-02-19
|/ | | | | | | | * 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
* lsp: match textDocument/didChange eol behavior (#13792)Michael Lingelbach2021-01-25
| | | We should be consistent in sending the EOL character to servers(I think). Julia expects this to match on bufwrite, or it crashes when vim appends the newline during the write process.
* lsp: clear diagnostics on client shutdown (#13788)Michael Lingelbach2021-01-23
|
* lsp: remove duplicate settings validation (#13789)Michael Lingelbach2021-01-18
|
* lsp: validate and document server settings (#13698)Michael Lingelbach2021-01-18
| | | | * update lua documentation * run docgen
* LSP: Fix nil settings handling in workspace/configuration (#13708)Mathias Fußenegger2021-01-18
| | | | | | | | | 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 in clientInfo to initalize_params. (#13757)Chris Kipp2021-01-18
| | | | | | | | | | | | * Add in clienInfo to initalize_params. Some servers (like Metals in my case) will actually pull this info from the initalize_params and display it in the logs. I know from the server perspective it helps at times to have this available to pull from to have more details about the client and version. You can see that this is part of the spec here: microsoft.github.io/language-server-protocol/specification#initialize
* lsp: fix on_attach signature documentation (#13723)Michael Lingelbach2021-01-12
| | | * trim trailing whitespace from docs
* 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.
* lsp: Fix text payload in didSave notification (#13363)Mathias Fußenegger2020-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the specification[1] the payload must look like this: interface DidSaveTextDocumentParams { /** * The document that was saved. */ textDocument: TextDocumentIdentifier; /** * Optional the content when saved. Depends on the includeText value * when the save notification was requested. */ text?: string; } `text` must be on the same level as `textDocument´. Where `TextDocumentIdentifier` is: interface TextDocumentIdentifier { /** * The text document's URI. */ uri: DocumentUri; } [1]: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave
* feat: Allow incremental sync & lsp flags (#13371)TJ DeVries2020-12-08
|
* lsp: Fix "unsupported_method" error when the buffer does not have an LSP ↵eightpigs2020-12-03
| | | | Server (#13175)
* LSP: Feature/add workspace folders (#12638)Michael Lingelbach2020-11-25
| | | | | | | | | | | * First implementation of workspace folders * Add completion for current directory * Add tracking of workspace folders * Add workspace folder listing * Add checks on adding/removing workspaces * Add appropriate initialization options * Add documentation * Make workspaceFolders available wherever client is
* lsp: vim.lsp.diagnostic (#12655)TJ DeVries2020-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Breaking Changes: - Deprecated all `vim.lsp.util.{*diagnostics*}()` functions. - Instead, all functions must be found in vim.lsp.diagnostic - For now, they issue a warning ONCE per neovim session. In a "little while" we will remove them completely. - `vim.lsp.callbacks` has moved to `vim.lsp.handlers`. - For a "little while" we will just redirect `vim.lsp.callbacks` to `vim.lsp.handlers`. However, we will remove this at some point, so it is recommended that you change all of your references to `callbacks` into `handlers`. - This also means that for functions like |vim.lsp.start_client()| and similar, keyword style arguments have moved from "callbacks" to "handlers". Once again, these are currently being forward, but will cease to be forwarded in a "little while". - Changed the highlight groups for LspDiagnostic highlight as they were inconsistently named. - For more information, see |lsp-highlight-diagnostics| - Changed the sign group names as well, to be consistent with |lsp-highlight-diagnostics| General Enhancements: - Rewrote much of the getting started help document for lsp. It also provides a much nicer configuration strategy, so as to not recommend globally overwriting builtin neovim mappings. LSP Enhancements: - Introduced the concept of |lsp-handlers| which will allow much better customization for users without having to copy & paste entire files / functions / etc. Diagnostic Enhancements: - "goto next diagnostic" |vim.lsp.diagnostic.goto_next()| - "goto prev diagnostic" |vim.lsp.diagnostic.goto_prev()| - For each of the gotos, auto open diagnostics is available as a configuration option - Configurable diagnostic handling: - See |vim.lsp.diagnostic.on_publish_diagnostics()| - Delay display until after insert mode - Configure signs - Configure virtual text - Configure underline - Set the location list with the buffers diagnostics. - See |vim.lsp.diagnostic.set_loclist()| - Better performance for getting counts and line diagnostics - They are now cached on save, to enhance lookups. - Particularly useful for checking in statusline, etc. - Actual testing :) - See ./test/functional/plugin/lsp/diagnostic_spec.lua - Added `guisp` for underline highlighting NOTE: "a little while" means enough time to feel like most plugins and plugin authors have had a chance to refactor their code to use the updated calls. Then we will remove them completely. There is no need to keep them, because we don't have any released version of neovim that exposes these APIs. I'm trying to be nice to people following HEAD :) Co-authored: [Twitch Chat 2020](https://twitch.tv/teej_dv)
* lsp: fix fallback for callback in method_unsupportedfrancisco souza2020-10-25
| | | | Missed this #12764. My bad :((
* lsp: only send buf requests to servers that support the request (#12764)francisco souza2020-10-25
| | | | | | | | | | | | | Refactors how required capabilities are detected and validated, and make sure requests are only sent to clients that support it (and only fail if no clients support the provided method). The validation happens at the buf_request level, because we assume that if someone is sending the request directly through the client, they know what they're doing. Also, let unknown methods go through. This is extracted from #12518 and closes #12755. Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
* lsp: Fix "client has shut down" errors during initializing (#13103)Mathias Fußenegger2020-10-22
| | | | | | | | | | Language servers can already send log messages to the client while the server is still being initialized. This currently leads to "client has shut down" messages which are confusing to the user as the server is properly starting. To fix this this changes the `get_client_by_id` method to also return a client if it is still initializing.
* Merge #12468 'lsp: logging'Justin M. Keyes2020-09-01
|\
| * lsp: add key name to the output log valueHirokazu Hata2020-08-26
| | | | | | | | Unless we look at the code every time, we will not know what the value is, so add the key name.
* | docs, remove 'guifontset' #11708Justin M. Keyes2020-08-31
|/ | | | | | | | | | | | | - remove redundant autocmd list This "grouped" list is useless, it only gets in the way when searching for event names. - intro.txt: cleanup - starting.txt: update, revisit - doc: `:help bisect` - mbyte.txt: update aliases 1656367b90bd. closes #11960 - options: remove 'guifontset'. Why: - It is complicated and is used by almost no one. - It is unlikely to be implemented by Nvim GUIs (complicated to parse, specific to Xorg...).
* Add FIXMEsPatrice Peterson2020-08-23
|
* Add docs for most vim.lsp methodsPatrice Peterson2020-08-23
| | | | Most of the lsp.log will be addressed in a separate PR.
* lsp: Add support for call hierarchies (#12556)cbarrete2020-07-18
| | | | | | | | | | | | | | | | | | * LSP: Add support for call hierarchies * LSP: Add support for call hierarchies * LSP: Add support for call hierarchies * LSP: Jump to call location Jump to the call site instead of jumping to the definition of the caller/callee. * LSP: add tests for the call hierarchy callbacks * Fix linting error Co-authored-by: Cédric Barreteau <>
* doc: fix scripts and regenerate (#12506)TJ DeVries2020-07-02
| | | | | | | | | | | | | | | | | * Fix some small doc issues * doc: fixup * doc: fixup * Fix lint and rebase * Remove bad advice * Ugh, stupid mpack files... * Don't let people include these for now until they specifically want to * Prevent duplicate tag
* lsp: even if contents before change is 0 byte, request to serverHirokazu Hata2020-06-11
| | | | fix: https://github.com/neovim/neovim/issues/12414
* lsp: Add check for `declaration` and `typeDefinition` support in vim lsp ↵Dheepak Krishnamurthy2020-06-04
| | | | | | | | | | | | | server before making `request` (#12421) * Add check for typeDefinition support in vim lsp server * Check for typeDefinitionProvider in server * Check for declarationProvider in server * Add check for client support * Fix typo
* lua: vim.wait implementationTJ DeVries2020-05-30
|
* lsp: make the command error message more detailed (#11633)Hirokazu Hata2020-05-26
| | | | | * lsp.lua: make the error message more detailed * test: add lsp._cmd_part test
* lsp: add workspace/symbol (#12224)Christian Clason2020-05-02
| | | | | | | | * lsp: add workspace/symbol * refactor symbol callback * set hierarchical symbol support to true * add documentation and default mapping Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
* LSP: enable using different highlighting rules for LSP signs (#12176)Ghjuvan Lacambre2020-04-29
| | | | | | | | | | | | | This commit creates 4 new highlight groups: - LspDiagnosticsErrorSign - LspDiagnosticsWarningSign - LspDiagnosticsInformationSign - LspDiagnosticsHintSign These highlight groups are linked to their corresponding LspDiagnostics highlight groups by default. This lets users choose a different color for their sign columns and virtualtext diagnostics.
* lsp: use vim.tbl_isempty to check sign (#12190)Hirokazu Hata2020-04-28
| | | | | ref: #12164 fix #12201 sign_getdefined() returns a list, {} if the sign is not defined.
* LSP: don't redefine LspDiagnostics signs #12164jakbyte2020-04-26
| | | fix #12162
* lsp: remove buffer version on buffer_detach (#12029)Hirokazu Hata2020-04-25
| | | | When we save the buffer, the buffer is detached and attached again. So the client also needs to remove the buffer version once.
* Merge pull request #11927 from Jesse-Bakker/lsp-buf-versionBjörn Linse2020-03-16
|\ | | | | LSP: Use buffer version instead of changedtick for edits
| * Use buffer version instead of changedtick for editsJesse Bakker2020-02-27
| |
* | lsp: add 'textDocument/documentSymbol’ callbackHirokazu Hata2020-03-01
| | | | | | | | Spec: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol
* | lsp: add bufnr to callback function argumentsHirokazu Hata2020-02-28
| | | | | | | | | | DocumentSymbol type doesn't have location field. So when we'll add 'textDocument/documentSymbol’ handler, we can't decide which file have we jump to.
* | add support to show diagnostics count in statusline (#11641)Alvaro Muñoz2020-02-26
|/ | | | | * add support to show diagnostics count in statusline * documentation