aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
Commit message (Collapse)AuthorAge
* fix(ui): close floating window on BufLeave event (#16557)ii142021-12-15
| | | | | | | | | When buffer is visible in two splits simultaneously, BufHidden event is not triggered, causing the floating window to remain on screen after switching to another buffer. Remove BufHidden event from close_events defaults, and close the window if we changed the buffer to something other than the buffer that spawned the floating window or the floating window buffer itself.
* fix(lsp): create lsp requests with position offsets considering client ↵Rishikesh Vaishnav2021-12-10
| | | | | | encoding (#16382) Co-authored-by: black-desk <clx814727823@gmail.com> Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
* refactor(diagnostic): add warning to deprecated functions (#16536)dundargoc2021-12-08
|
* feat(lsp,diagnostic): open folds in jump-related functions (#16520)Dmytro Meleshko2021-12-04
|
* Merge pull request #16460 from dundargoc/chore/typosBjörn Linse2021-11-30
|\ | | | | chore: fix typos
| * docs(lsp): do not use | as argument separatorGregory Anders2021-11-30
| | | | | | | | This translates into a tag in the help doc.
| * docs(lsp): add annotations for private functionsGregory Anders2021-11-30
| |
* | feat(lsp): add 'focus' option to open_floating_preview (#16465)Gregory Anders2021-11-29
|/ | | | | | | | | When the 'focusable' and 'focus_id' parameters are set, `open_floating_preview` assumes that it should always move focus to an existing floating window with the same 'focus_id'. However, there are cases where we want to make a floating window focusable, but do not want to focus it upon calling `open_floating_preview`. To distinguish these cases, add a boolean parameter 'focus' that, when false, prevents moving focus.
* chore: fix typos (#16361)dundargoc2021-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com> Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
* fix(lsp): require bufnr for apply_text_edits (#16444)Michael Lingelbach2021-11-26
|
* perf(lsp)!: use faster line retrieval for utf-16 to byte idx conversion (#16360)Mathias Fußenegger2021-11-24
|
* fix(ui): use nowait for q mapping in floating window (#16427)ii142021-11-24
|
* fix(lsp): change signature of buf_highlight_references (#16345)Michael Lingelbach2021-11-17
| | | | | the prior signature did not assume an active language client this function can now be used directly by passing an offset encoding defaults to utf-16 (standard for LSP)
* fix(lsp): ensure buffers are re-attached on rename (#16266)Mathias Fußenegger2021-11-14
| | | | | | | | | If a LSP server sent a workspace edit containing a rename the buffers file name changed without the server receiving a close notification for the old buffer and without the client properly re-attaching on the new file. This affected `Move` code-actions in nvim-jdtls, but also `vim.lsp.buf.rename` on a class level.
* fix(lsp): rewrite incremental sync (#16252)Michael Lingelbach2021-11-09
| | | | | | * use codeunits/points instead of byte ranges when applicable * take into account different file formats when computing range and sending text (dos, unix, and mac supported) * add tests of incremental sync
* fix(lsp): convert range to byte index before highlighting (#16218)elianiva2021-11-06
| | | | Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
* fix(lsp): improve symbols_to_items performance (#16197)Michael Lingelbach2021-10-31
| | | | | * use table.insert instead of list_extend to avoid validation overhead Co-authored-by: Gianmarco Fantinuoli <fanto-dev@hotmail.com>
* fix(lsp): default to UTF-16 when lsp client using str_utfindexblack_desk2021-10-31
|
* fix(lsp): default to UTF-16 in make_position_paramsblack_desk2021-10-31
|
* fix(lsp): cleanup progress messages for the correct client (#16110)Folke Lemaitre2021-10-21
|
* fix(lsp): fix cursor row after textEdits (#16038)hrsh7th2021-10-18
|
* fix(lsp): add done flag to messages returned in util.get_progress_messages() ↵jdrouhard2021-10-10
| | | | (#15985)
* docs(lsp): clarify parameters of some util functions (#15851)zeertzjq2021-10-02
| | | | `pad_left` and `pad_right` are unused List used keys of `opts` in `make_floating_popup_options`
* fix(float)!: always anchor to corner of window including border #15832zeertzjq2021-10-02
| | | | | | | | | | N, W, S, E are all inclusive, i.e., always anchor to the exact corner of the window (including border). This line may also need change in this case (change 0 to -1): This is most consistent and easiest to reason about, especially with GUIs whose border do not need to have width/height of 1/1 in cell units. Fix #15789
* feat(lsp): improve vim.lsp.util.apply_text_edits (#15561)hrsh7th2021-09-18
| | | | | - Fix the cursor position after applying TextEdits - Support reversed range of TextEdit - Invoke nvim_buf_set_text one by one
* 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
* fix(lsp): correctly parse LSP snippets #15579hrsh7th2021-09-14
| | | Fixes #15522
* feat(lsp): get_border_size(): support repeating border char list #15474zeertzjq2021-08-27
|
* 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.
* 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
|
* feat(lsp): allow configuring zindex for floating windows (#15086)rayx2021-07-19
|
* 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): support duplicate params in signature help (#15032)Folke Lemaitre2021-07-09
|
* feat(lsp): highlight active parameter in signature help (#15018)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
|
* 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