aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
Commit message (Collapse)AuthorAge
...
* | lsp: Ensure floating markdown buffers are deleted on hideMathias Fussenegger2021-05-26
|/ | | | | After the change to use fancy_floating_markdown for the signature help I noticed that scratch buffers start to accumulate.
* Merge pull request #14615 from folke/faster_locations_to_itemsMichael Lingelbach2021-05-22
|\ | | | | perf(lsp): `locations_to_items`: use libuv for unloaded buffers to get line
| * perf(lsp): locations_to_items use libuv for unloaded buffers to get lineFolke Lemaitre2021-05-22
| |
* | Merge pull request #14269 from fdschmidt93/fix/document_symbol_rangeMichael Lingelbach2021-05-22
|\ \ | | | | | | fix(lsp): prefer selectionRange over range for document symbols in vim.lsp.util.symbols_to_items
| * | fix: selectionrange over range for document symbolsFabian David Schmidt2021-04-01
| | |
* | | Merge pull request #14603 from folke/format_on_saveMichael Lingelbach2021-05-22
|\ \ \ | |_|/ |/| | fix(lsp): allow apply_text_edits to append text (insert at last line)
| * | fix(lsp): allow apply_text_edits and set_lines to insert text after the last ↵Folke Lemaitre2021-05-21
| | | | | | | | | | | | line. Fixes #14017
* | | feat(lsp): use fancy_floating_markdown for signature_helpFolke Lemaitre2021-05-21
| | |
* | | fix(lsp): clear current_syntax before formatting fancy markdown regionFolke Lemaitre2021-05-21
| | |
* | | fix(lsp): preview_location options and syntax fallbackFolke Lemaitre2021-05-21
| | |
* | | feat(lsp): lsp.util.fancy_floating_markdown improvementsFolke Lemaitre2021-05-21
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix: fancy_floating_markdown: syn region must include keepend to make sure syntax regions are applied correctly. Fixes #14594 feat: fancy_floating_markdown: handle <pre></pre> code blocks as a markdown code block with plaintext fix: possible nil check for markdown code blocks till end of buffer refactor: only one check is needed to see if stripped[h.finish +1] is valid fix(lsp): dont't set doc ownsyntax, since it breaks contained syntaxes. Set regions for the markdown blocks intsead fix: apply markdown formatting for code blocks without a language fix: use markdownCodeBlock when no language was set in a code block
* | Merge pull request #14563 from mjlbach/fix_intelephense_langserverMichael Lingelbach2021-05-19
|\ \ | | | | | | lsp: handle case where CompletionItem.insertTextFormat is nil
| * | lsp: handle case where CompletionItem.insertTextFormat is nilMichael Lingelbach2021-05-16
| | | | | | | | | | | | * Update tests to use explicit insertTextFormat for snippets
* | | Revert "lsp: make tagstack smarter motion-wise (#12262)"Marco Hinz2021-05-19
| | | | | | | | | | | | This reverts commit 8885ea7f244ee49b0018dc57be84917ea7886c2d.
* | | Revert "lsp: fix regression in jump_to_location() (#14446)"Marco Hinz2021-05-19
| | | | | | | | | | | | This reverts commit 993ca90c9b53033216d4973e2f995b995ed5740e.
* | | lsp: Fix range end offset off by one characterMickaël Menu2021-05-14
|/ /
* | lsp: fix regression in jump_to_location() (#14446)francisco souza2021-05-01
| | | | | | | | | | This fixes a regression that was introduced in [1] by accidentally leaving out a line. 1: https://github.com/neovim/neovim/pull/12262
* | lsp: make tagstack smarter motion-wise (#12262)Gabriel Sanches2021-04-23
| | | | | | | | | | | | | | | | | | | | | | 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.
* | lsp: Remove vim.NIL handling from apply_text_document_editMathias Fussenegger2021-04-14
| | | | | | | | | | The rpc layer normalizes `vim.NIL` to `nil`, so the scenario tested should never happen.
* | lsp: Accept text document edits with version zeroMathias Fussenegger2021-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: fix _make_floating_popup_size when wrap_at is nil (#14359)Michael Lingelbach2021-04-14
| |
* | lsp: correct float placement when using bordersMarco Hinz2021-04-12
| | | | | | | | | | Because borders add up to 2 to the height of a float, we need to subtract that from the anchor position, when opening a float in the lower half of the window.
* | lsp: make sure borders are always inside of the screenMarco Hinz2021-04-12
| | | | | | | | | | Add a helper function to get the additional width a border adds to a float to make sure that the border is always inside the visible screen.
* | feat(lsp): make hover/signature_help borders configurableelianiva2021-04-06
| | | | | | | | | | | | change hl groups for the example rename borders -> border
* | lsp: floating window improvements (#14207)Michael Lingelbach2021-04-05
|/ | | | * remove left/right padding feature from trim_and_pad * use invisible borders by default on floating windows
* lsp: use utf-8 when utf-16 not requestedMichael Lingelbach2021-03-30
|
* lsp: fix utf-16 ranges to use second return value for incremental syncMichael Lingelbach2021-03-28
|
* lsp: fix utf16 ranges for incremental syncMichael Lingelbach2021-03-27
|
* runtime/lua/vim/lsp: check emptyness in get_completion_wordVincent Rischmann2021-03-21
|
* lsp: set syntax instead of filetype for preview location highlightingMichael Lingelbach2021-03-19
|
* 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: fix highlighting for lsp markdown code blocksMichael Lingelbach2021-03-10
|
* Merge pull request #14073 from mjlbach/feature/syntax_highlight_ruleMichael Lingelbach2021-03-10
|\ | | | | lsp: add custom syntax rule for floating window
| * lsp: add custom syntax rules for lsp floating windowMichael Lingelbach2021-03-09
| |
* | lsp: add incremental text synchronizationMichael Lingelbach2021-03-09
|/ | | | | * Implementation derived from and validated by vim-lsc authored by Nate Bosch
* 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: Fix text edits operating on the last line of a document (#13677)Mathias Fußenegger2021-02-19
| | | | | | `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: Fix pumvisible() check introduced in #12900 (#13866)runiq2021-02-04
| | | | | | | | `pumvisible()` returns a number, and numbers are always `true` in Lua, so the return value needs to be checked explicitly. Using https://github.com/neovim/neovim/pull/12900 as context, it appears the intention was to move into the `if` branch when the completion popup is not shown (i.e. `vim.fn.pumvisible() == 0`).
* fix(lsp): Allow subsequent text document edits to pass (#13534)TJ DeVries2021-01-11
| | | | | | | * fix: Allow subsequent text document edits to pass * fixup: cleaner code * add tests
* LSP: Add helper function from accessing language server settings from ↵Michael Lingelbach2021-01-01
| | | | nvim-lspconfig
* 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.
* doc: Fix incorrect LSP diagnostic-related helptags (#13388)Kevin Fleming2020-12-09
|
* feat: Allow incremental sync & lsp flags (#13371)TJ DeVries2020-12-08
|
* lsp: Make open_floating_preview buffers ephemeral (#13437)runiq2020-12-03
| | | Fixes #13429.
* 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: remove vim.NIL from processing (#13174)TJ DeVries2020-11-02
| | | | | * lsp: remove vim.NIL from processing * lsp: remove instances of vim.NIL
* lsp: Fix case where active_signature == vim.NIL (#13114)Michael Lingelbach2020-10-27
|