aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
Commit message (Collapse)AuthorAge
* feat(lsp): improve vim.lsp.util.apply_text_edits (#15561)hrsh7th2021-09-26
| | | | | | - Fix the cursor position after applying TextEdits - Support reversed range of TextEdit - Invoke nvim_buf_set_text one by one
* fix(lsp): correctly parse LSP snippets #15579hrsh7th2021-09-14
| | | | Fixes #15522
* backport: fix(lsp): prevent double <text> for cached plaintext markupFolke Lemaitre2021-09-14
|
* 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
|
* feat(lsp): use markdown_fenced_languages in stylized_markdownFolke Lemaitre2021-06-25
|
* chore(lsp): removed deprecated floating preview methodsFolke Lemaitre2021-06-17
|
* fix(lsp): replace --- by a line in stylize_markdownFolke Lemaitre2021-06-15
|
* fix(lsp): allow 'rounded' and 'solid' in floatsTimothée Sterle2021-06-14
|
* fix(lsp): convert_input_to_markdown_lines: preserve plaintextFolke Lemaitre2021-06-12
|
* feat(lsp): Split out a `diagnostics_to_items` function from set_loclistMathias Fussenegger2021-06-07
| | | | | Makes it easier to re-use the logic to populate the quickfix list instead of the location list.
* Merge pull request #14726 from folke/lsp_single_popup_per_bufferMichael Lingelbach2021-06-06
|\ | | | | fix(lsp): max 1 floating preview per buffer. Fixes #11508
| * fix(lsp): max 1 floating preview per buffer. Fixes #11508Folke Lemaitre2021-06-05
| |
* | feat(lsp): extend diagnostic.set_loclistViktor Kojouharov2021-06-06
| | | | | | | | add option to show workspace diagnostic instead of the current buffer's
* | docs(lsp): fix locations_to_items docstringMichael Lingelbach2021-06-05
| |
* | Merge pull request #14730 from mjlbach/feature/open_loclist_on_winMichael Lingelbach2021-06-05
|\ \ | | | | | | fix(lsp): set_loclist should target current win
| * | fix(lsp): set_loclist should target current winMichael Lingelbach2021-06-05
| |/ | | | | | | | | | | Currently, for large number of diagnostics, the delay in populating loclist may be sufficient for a user to switch to another window, resulting in the loclist being populated on the wrong window.
* / fix(lsp): floating window border size for string type 'none' and 'shadow'ray-x2021-06-02
|/
* Merge pull request #14693 from ↵Michael Lingelbach2021-06-01
|\ | | | | | | | | shadmansaleh/enhance/lsp/make_focusable_parameter_configurable feat(lsp): Make focusability of lsp float configurable
| * docs(lsp): Fix opts param not captured by docgenshadmansaleh2021-06-01
| | | | | | | | | | | | In the documentation for `vim.lsp.util.open_floating_preview` the opts table keys were prefixed with `--` instead of `---`, preventing capture by docgen.
| * feat(lsp): Make focusability of lsp float configurableshadmansaleh2021-06-01
| | | | | | | | | | | | | | | | | | | | | | This pr allows the user to specify whether `lsp.utils.open_floating_preview` is focusable via the `opts` parameter. Defaults to true. It can be configured by setting the focusable key inside opts parameter: ```lua vim.lsp.util.open_floating_preview(contents, syntax, {focusable = false}) ```
* | Merge pull request #14694 from folke/lsp_popup_borderMichael Lingelbach2021-06-01
|\ \ | |/ |/|
| * fix(lsp): properly handle border character list without highlight groups. ↵Folke Lemaitre2021-06-01
| | | | | | | | Fixes #14691
* | Merge pull request #14635 from folke/lsp_get_linesMichael Lingelbach2021-05-31
|\ \ | |/ |/| perf(lsp): get all lines from a file in one go (`locations_to_items`)
| * perf(lsp): get all lines from a file in one goFolke Lemaitre2021-05-25
| |
* | refactor(lsp): consolidate the different floating window methods into ↵Folke Lemaitre2021-05-29
| | | | | | | | open_floating_preview
* | 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.