Michael Lingelbach
2ecf0a4c61
fix(lsp): rewrite incremental sync ( #16252 )
...
* 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
2021-11-09 14:37:48 -08:00
elianiva
b74916cfd2
fix(lsp): convert range to byte index before highlighting ( #16218 )
...
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com >
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com >
2021-11-06 15:05:52 -07:00
Michael Lingelbach
5ad15c9fa1
fix(lsp): improve symbols_to_items performance ( #16197 )
...
* use table.insert instead of list_extend to avoid validation overhead
Co-authored-by: Gianmarco Fantinuoli <fanto-dev@hotmail.com >
2021-10-31 15:18:51 -07:00
black_desk
85a8bede45
fix(lsp): default to UTF-16 when lsp client using str_utfindex
2021-10-31 14:15:56 -07:00
black_desk
2e3a4747e2
fix(lsp): default to UTF-16 in make_position_params
2021-10-31 14:15:56 -07:00
Folke Lemaitre
cb15055c29
fix(lsp): cleanup progress messages for the correct client ( #16110 )
2021-10-21 09:36:27 -07:00
hrsh7th
bd2f61c6c4
fix(lsp): fix cursor row after textEdits ( #16038 )
2021-10-18 11:49:33 -07:00
jdrouhard
45fa70adcb
fix(lsp): add done flag to messages returned in util.get_progress_messages() ( #15985 )
2021-10-10 11:41:16 -07:00
zeertzjq
4449297d12
docs(lsp): clarify parameters of some util functions ( #15851 )
...
`pad_left` and `pad_right` are unused
List used keys of `opts` in `make_floating_popup_options`
2021-10-02 17:55:54 -07:00
zeertzjq
b3e815094b
fix(float)!: always anchor to corner of window including border #15832
...
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
2021-10-02 17:36:24 -07:00
hrsh7th
41cfba63cd
feat(lsp): improve vim.lsp.util.apply_text_edits ( #15561 )
...
- Fix the cursor position after applying TextEdits
- Support reversed range of TextEdit
- Invoke nvim_buf_set_text one by one
2021-09-18 13:19:21 -07:00
Gregory Anders
a5bbb932f9
refactor: move vim.lsp.diagnostic to vim.diagnostic
...
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
2021-09-15 14:09:47 -06:00
hrsh7th
516775e9d8
fix(lsp): correctly parse LSP snippets #15579
...
Fixes #15522
2021-09-14 04:31:41 -07:00
zeertzjq
f6e662bbe9
feat(lsp): get_border_size(): support repeating border char list #15474
2021-08-27 04:19:17 -07:00
Gregory Anders
c2a211b8e3
docs: make Lua docstrings consistent #15255
...
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.
2021-08-22 13:55:28 -07:00
Andrea Cappuccio
adebbebdd7
fix(lsp): properly handle nil
lines when trimming empty lines ( #15325 )
2021-08-10 20:52:30 +02:00
Hans Pinckaers
1a10acb997
fix(lsp): floating popup should take offset_x into account when positioning ( #15297 )
2021-08-09 23:56:58 +02:00
max397574
a3d5f391cf
docs: Add some references to LSP specification ( #15321 )
2021-08-09 19:45:00 +02:00
Folke Lemaitre
e7bde44d6d
fix(lsp): prevent duplicate lines seperated by newlines ( #15284 )
2021-08-06 17:15:49 -04:00
rayx
c487a73fa2
feat(lsp): allow configuring zindex for floating windows ( #15086 )
2021-07-19 09:03:59 -07:00
Ido Ariel
d8f5f4d090
doc(lsp): various small fixes ( #15113 )
...
- remove incorrect usage of docstrings
- fix make_formatting_params return type documentation to 'DocumentFormattingParams'
- make progress_handler private
- fix links
2021-07-17 11:15:57 +02:00
Folke Lemaitre
9132b76da6
fix(lsp): support duplicate params in signature help ( #15032 )
2021-07-09 03:38:29 -07:00
Folke Lemaitre
af263711a3
feat(lsp): highlight active parameter in signature help ( #15018 )
2021-07-07 23:04:35 -07:00
Folke Lemaitre
910967e5af
fix(lsp): prevent double <text> for cached plaintext markup
2021-07-05 00:39:46 +02:00
jimman2003
bdf3df4027
Fixed +1 -1 in util.lua ( #14913 )
...
No point in adding and then subtracting I believe ;)
2021-06-26 13:43:18 -04:00
Folke Lemaitre
e680d7d6af
fix(lsp): render the last line in stylize_markdown
2021-06-25 11:45:42 -07:00
Folke Lemaitre
28dde1038f
style(lsp): make get_markdown_fences private
2021-06-25 18:32:00 +02:00
Folke Lemaitre
aa1e20497a
feat(lsp): use markdown_fenced_languages in stylized_markdown
2021-06-25 17:27:38 +02:00
Folke Lemaitre
39d9713c5b
chore(lsp): removed deprecated floating preview methods
2021-06-17 07:48:40 +02:00
Folke Lemaitre
d7d1f40d2c
fix(lsp): replace --- by a line in stylize_markdown
2021-06-15 07:35:58 +02:00
Timothée Sterle
15039d7597
fix(lsp): allow 'rounded' and 'solid' in floats
2021-06-14 23:19:45 +02:00
Folke Lemaitre
afb0274c28
fix(lsp): convert_input_to_markdown_lines: preserve plaintext
2021-06-12 21:47:17 +02:00
Mathias Fussenegger
f03a4d616b
feat(lsp): Split out a diagnostics_to_items
function from set_loclist
...
Makes it easier to re-use the logic to populate the quickfix list
instead of the location list.
2021-06-07 18:24:32 +02:00
Michael Lingelbach
4ce61742cf
Merge pull request #14726 from folke/lsp_single_popup_per_buffer
...
fix(lsp): max 1 floating preview per buffer. Fixes #11508
2021-06-06 03:22:10 -07:00
Viktor Kojouharov
36d05845f7
feat(lsp): extend diagnostic.set_loclist
...
add option to show workspace diagnostic instead of the current buffer's
2021-06-06 09:59:46 +02:00
Michael Lingelbach
5902bed406
docs(lsp): fix locations_to_items docstring
2021-06-05 17:22:47 -07:00
Michael Lingelbach
36802b895f
Merge pull request #14730 from mjlbach/feature/open_loclist_on_win
...
fix(lsp): set_loclist should target current win
2021-06-05 17:12:55 -07:00
Michael Lingelbach
15abde1676
fix(lsp): set_loclist should target current win
...
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.
2021-06-05 14:46:10 -07:00
Folke Lemaitre
149efa9b2b
fix(lsp): max 1 floating preview per buffer. Fixes #11508
2021-06-05 10:13:01 +02:00
ray-x
351050a10f
fix(lsp): floating window border size for string type 'none' and 'shadow'
2021-06-02 20:44:13 +10:00
Michael Lingelbach
b10cda83fa
Merge pull request #14693 from shadmansaleh/enhance/lsp/make_focusable_parameter_configurable
...
feat(lsp): Make focusability of lsp float configurable
2021-06-01 04:32:59 -07:00
shadmansaleh
68d48e25b6
docs(lsp): Fix opts param not captured by docgen
...
In the documentation for `vim.lsp.util.open_floating_preview`
the opts table keys were prefixed with `--` instead of `---`,
preventing capture by docgen.
2021-06-01 17:29:06 +06:00
shadmansaleh
0bd34cb4ec
feat(lsp): Make focusability of lsp float configurable
...
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})
```
2021-06-01 17:23:35 +06:00
Michael Lingelbach
64bdaef327
Merge pull request #14694 from folke/lsp_popup_border
2021-06-01 01:52:38 -07:00
Folke Lemaitre
0ece34cbb8
fix(lsp): properly handle border character list without highlight groups. Fixes #14691
2021-06-01 09:36:29 +02:00
Michael Lingelbach
96dfa07642
Merge pull request #14635 from folke/lsp_get_lines
...
perf(lsp): get all lines from a file in one go (`locations_to_items`)
2021-05-31 11:12:23 -07:00
Folke Lemaitre
64da499ac2
refactor(lsp): consolidate the different floating window methods into open_floating_preview
2021-05-29 13:42:15 +02:00
Mathias Fussenegger
e06a73900f
lsp: Ensure floating markdown buffers are deleted on hide
...
After the change to use fancy_floating_markdown for the signature help I
noticed that scratch buffers start to accumulate.
2021-05-26 19:27:04 +02:00
Folke Lemaitre
54c441c80b
perf(lsp): get all lines from a file in one go
2021-05-25 12:23:39 +02:00
Michael Lingelbach
0cbe748da3
Merge pull request #14615 from folke/faster_locations_to_items
...
perf(lsp): `locations_to_items`: use libuv for unloaded buffers to get line
2021-05-22 10:58:45 -07:00