Commit Graph

1024 Commits

Author SHA1 Message Date
Yasuhiro Matsumoto
6d4719e794 make lsp#ensure_flush_all public for delaying initialize 2025-11-03 08:10:25 +09:00
Shinya Ohyanagi
04ef607075 Fix completion item text selection priority (#1614)
* Fix completion item text selection priority

According to the Language Server Protocol 3.17 specification:

- filterText is only used for filtering and sorting completion items
- When textEdit is provided, insertText must be ignored

* Fix filtering should be performed on filterText

If `filterText` exists, the filtering target has been changed from `word`.

The filter is defined as follows in the LSP specification:

```
A string that should be used when filtering a set of completion items.
When omitted the label is used as the filter text for this item.
```

* Fix remove unnecessary empty check condition

---------

Co-authored-by: mattn <mattn.jp@gmail.com>
2025-10-06 21:53:27 +09:00
mattn
be06c95281 append .0 to libgmodule.so on LD_PRELOAD (#1616) 2025-10-01 10:13:03 +09:00
Jorenar
04428c9200 Improve checking for 'completionProvider' (#1574) 2024-09-22 16:16:10 -07:00
hrsh7th
356254d638 Update vital-vs for fixing to scroll bordererd-window (#1556)
Co-authored-by: Prabir Shrestha <mail@prabir.me>
2024-08-04 19:08:44 -07:00
Jorenar
396d248528 Add missing borders to Neovim's floating windows (#1565)
Brings behaviour closer to Vim
2024-08-04 17:00:36 -07:00
Rodrigo Goya
6b7aabde99 Add check for server entry in buffer entry. (#1548) 2024-07-19 22:59:14 -07:00
Thomas Bruyelle
e05c42fbf0 fix(text_edit): discarded change from the initial buffer (#1552)
* fix(text_edit): discarded change from the initial buffer

When multiple calls to apply_text_edits, the changes made to the current
buffer are discarded if the following text_edit concerns a file that
is not in the buffer list.

The problem comes from the _switch function, which executes `edit!` when
it detects that the target is not in the buffer list. If a change was
made to the current buffer before that, that change is discarded
(definition of `edit!`).

The fix consists of a different logic: when _switch detects that the
target is not in the buffer list, it calls `badd` prior to switching to
the buffer that has just been added. No more `edit!`, no more discarded
changes.

The added test fails without the patch in the _switch function.

* use better way to have a named buffer
2024-07-19 22:56:11 -07:00
YunmingChan
0094b5e0fc fix typo in doc (#1561) 2024-07-19 22:55:03 -07:00
pocari
445c20708a check deprecated function (#1562) 2024-07-19 22:53:41 -07:00
Prabir Shrestha
2e03278605 Revert "Switch to the new Neovim health API, since the old report_health func…" (#1569)
This reverts commit f160fe2719.
2024-07-19 22:53:30 -07:00
Oisín
f160fe2719 Switch to the new Neovim health API, since the old report_health functions are deprecated and break :checkhealth in recent versions of neovim (#1567) 2024-07-19 22:40:10 -07:00
Kebin Liu
a8f244a4e9 Add document for server_info.env (#1559)
* Add document for server_info.env

* Fix format

* Remove action cache to avoid random fails
2024-06-20 16:36:17 -07:00
dundargoc
f7ccf006df Remove mention of neovim as the checkhealth syntax is deprecated there (#1525)
Co-authored-by: Prabir Shrestha <mail@prabir.me>
2024-02-25 03:09:29 -08:00
Prabir Shrestha
b132b6a43d Add try..catch as id as string is not supported by vim. (#1538)
* Add try..catch as id as string is not supported by vim.
https://github.com/vim/vim/issues/14091
2024-02-25 03:04:34 -08:00
Hoagy
2829332051 fix neovim highlighting (#1535) 2024-02-14 17:26:35 -08:00
renovate[bot]
c20c6650d3 chore(deps): update actions/cache action to v4 (#1527) 2024-01-20 01:31:54 -08:00
Alberto Fanjul
d36f381dc8 Include declarations getting references (#1523) 2023-12-21 15:50:36 -08:00
renovate[bot]
dd862d3430 chore(deps): update actions/setup-go action to v5 (#1517) 2023-12-11 22:47:33 -08:00
Illia Bobyr
8b5980b94f doc: Rephrase LspStopServer description (#1518)
At some point when writing the `LspStopServer` description I've
incorrectly merged two sentences into.  Fixed that and added a few minor
clarifications.
2023-12-11 18:26:56 -08:00
Krzysztof Sachanowicz
3af8f3b38e Fix various bugs when loading many buffers (#1511)
* fix languageId incorrectly set to "ctrlspace"

* remove get_line_count_buf() which incorrectly returned line('$') for hidden buffers

The problem was that current buffer may not be the one requested. Later it
caused vim to throw exception about invalid line number when setting text props,
and that led to initialization failure for some buffers (and lsp_buffer_enabled
autocommand not fired).

* don't register server twice

* skip registering server only if server_info matches

* revert changes to lsp#register_server

---------

Co-authored-by: Krzysztof Sachanowicz <ksachanowicz@striketechnologies.com>
2023-11-24 19:40:24 -08:00
Jialu
dbe8b17c09 diagnostics/highlights: add patch check for getbufoneline() (#1514) 2023-11-19 20:03:00 -08:00
Jakub Łukasiewicz
ee2bb88833 Set meaningful title to QuickFix window instead of :setqflist() (#1502)
fixes #293
fixes #1483
2023-11-10 21:42:53 -08:00
Prabir Shrestha
c58edb98f0 Revert "use feedkeys(xxx, 'ni'), fix #1345 (#1493)" (#1503)
This reverts commit 822c6ac470.
2023-10-15 21:35:42 -07:00
ZERO
822c6ac470 use feedkeys(xxx, 'ni'), fix #1345 (#1493) 2023-10-15 20:53:55 -07:00
FUD2008
9649d3f848 fix: E684: List index out of range: 0 (#1481) 2023-10-09 20:33:51 -07:00
Satoru Kitaguchi
7233bb2ec0 Add LspAddTreeReferences (#1484) 2023-09-08 22:25:51 -07:00
Illia Bobyr
aa93b2a570 LspStopServer: Stop all and stop specific (#1491)
It is convenient to be able to stop all LSP servers, regardless of the
currently active buffer.

Also, it seems confusing that when a server name is specified, it is
only stopped if it is also one handling the current buffer type.  I
would imagine it is quite rare to have more than one server handing a
specific buffer type.  And if one explicitly specified a name, it seems
reasonable to stop this particular server, regardless of the currently
active buffer.
2023-09-08 21:17:24 -07:00
renovate[bot]
d802909443 chore(deps): update actions/checkout action to v4 (#1495) 2023-09-04 12:03:51 -07:00
Illia Bobyr
7dd6b72d0c doc: Document actual LspStopServer behavior (#1490)
Actual behavior was slightly different from the documented one.

Co-authored-by: mattn <mattn.jp@gmail.com>
2023-08-15 15:18:48 +09:00
jiz4oh
42d223c266 Fix disappeared kind (#1485) 2023-08-15 13:48:30 +09:00
Satoru Kitaguchi
2be2b07b53 Support lsp_document_symbol_detail option (#1482)
* Support `lsp_document_symbol_detail` option

to show details

* fixup! Support `lsp_document_symbol_detail` option
2023-08-04 18:58:33 -07:00
mityu
39bad0b67e Fix :LspNextWarning is not correctly tagged (#1476) 2023-06-25 11:33:03 -07:00
Colin Cheng
e74bd3c986 Fix ':LspStopServer' not working when enable native lsp client support (#1473)
When set `let g:lsp_use_native_client = 1` to enable native lsp client support,
if call `:LspStopServer` to stop the lsp server, the server stopped but the
status still show it as `running` by `:LspStatus`, this patch try to fix
this issue.
2023-05-15 10:16:45 -07:00
Milly
8351fd3cea Close float window on InsertEnter or BufLeave (#1459)
* Close float window on InsertEnter or BufLeave
* Ignore vint in dynamically executed augroups
2023-05-15 10:16:03 -07:00
Piotr Usewicz
6017a30e8a Enable scrollbar in popup window (#1469)
LspHover can show a lot of text sometimes. Enabling the scrollbar ensures it can be scrolled via mouse, for example.

Tested locally.

Closes https://github.com/prabirshrestha/vim-lsp/issues/1457
2023-05-04 13:09:52 -07:00
Colin Cheng
507565f281 fix eat of typing char after completion done (#1468)
When using typescript-language-server, in content `Math.ab|`, if you type
`<C-X><C-o>` for omni completion, it will be completed with `s`. Then, the
content will become `Math.abs|`. If you continue typing `(`, the `(` will
be removed. Also, if type `<CR>`, a new line will be added, resulting in
`Math.abs|s\nMath.ab`. This patch attempts to fix this issue.
2023-04-27 23:21:05 +09:00
renovate[bot]
80644e108b Update actions/setup-go action to v4 (#1465) 2023-04-13 01:57:09 -07:00
renovate[bot]
7909c794ff Update actions/cache action to v3 (#1462)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-13 00:43:50 -07:00
renovate[bot]
af81e43810 Update actions/checkout action to v3 (#1463)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-13 00:33:44 -07:00
renovate[bot]
debf6232cb Add renovate.json (#1460) 2023-04-12 22:35:58 -07:00
Colin Cheng
06bf1b35ef Fix typo (#1458) 2023-04-10 10:58:00 -07:00
Gabriel Barta
6703edafe6 Improve performance placing signs and virtual text (#1455)
Since the functions don't change the linecount, call
getbufinfo(...).linecount once rather than many times.
2023-04-05 21:35:58 -07:00
Illia Bobyr
7d59166b18 g:lsp_diagnostics_virtual_text_align: List allowed values (#1445)
It is not immediately clear what are the possible values for this
configuration parameter.  And it is nice to be a bit more explicit about
the meaning of each option.

Co-authored-by: Prabir Shrestha <mail@prabir.me>
2023-04-03 17:36:11 -07:00
Illia Bobyr
44608334f9 Allow workspace_config to be a function (#1400)
It is sometimes useful to generate `workspace_config` using a callback.
For example, if the produced config needs to include some information
from the actual workspace.
2023-04-03 17:16:42 -07:00
Kebin Liu
e82e73a5eb Escape path before findfile or finddir (#1444) 2023-03-09 17:25:54 +09:00
Yutao Yuan
80cd62f8f2 Support sync option in vim8 native client (#1425)
`additionalTextEdits` was not working with native client because it uses
`'sync': 1` which was not handled by the code. This PR gets it working.
2023-03-03 21:03:33 -08:00
Coelacanthus
65628c3b0a fix inlay hint list separator (#1438)
fix #1430 

It lead wrong format.
2023-02-05 22:00:48 -08:00
Ryuichiroh
25337623cf Add vim 9.0 to CI (#1432) 2023-01-31 17:06:05 -08:00
Piotr Usewicz
ad6d61b13c Update name of the function (#1419) 2023-01-27 22:32:55 -08:00