| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Follow up to https://github.com/neovim/neovim/pull/32072
If there is no prefix (e.g. at the start of word boundary or a line), it
always used the `filterText` because the `match` function always
returned false.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
With language servers like lemminx, completing xml tags like `<mo` first
shows the right candidates (`modules`) but after typing `d` the
candidates disappear.
This is because the server returns:
[...]
filterText = "<module",
label = "module",
textEdit = {
newText = "<module>$1</module>$0",
Which resulted in `module` being used as `word`, and `module` doesn't
match the prefix `<mo`. Typing `d` causes the `complete()` filtering
mechanism to kick in and remove the entry.
Solution:
Use `<module` from the `filterText` as `word` if the textEdit/label
heuristic doesn't match.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
An LSP configuration that creates client with no root_dir or
workspace_folders can result in vim.lsp.enable attaching to it multiple
times.
Solution:
When checking existing clients, reuse a client if it wasn't initially
configured have any workspace_folders. This more closely matches the
behaviour we had prior to d9235ef
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: on `CompleteDone` cursor can jump to the end of line instead of
the end of the completed word.
Solution: remove only inserted word for snippet expansion instead of everything
until eol.
Fixes #30656
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Currently completion attribute hl_group is combined with
all items, which is redundant and confusing with kind_hlgroup
Solution: Renamed to abbr_hlgroup and combine it only with the abbr item
(glepnir).
closes: vim/vim#15818
https://github.com/vim/vim/commit/0fe17f8ffbd2588ecd2bf42dced556897bc64f89
Co-authored-by: glepnir <glephunter@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
Problem: prefix can be a symbol like period, the fuzzy matching can't
handle it correctly.
Solution: when prefix is empty or a symbol add all lsp completion
result into matches.
|
|
|
|
|
|
|
| |
Problem: Some items of completion results include function signatures that can
cause the pum to be very long when a function has many params, because pum
scales with the longest word/abbr.
Solution: add custom covert function that can customise abbr to remove params.
|
|
|
|
|
|
| |
Problem: CompletionItem in lsp spec mentioned the deprecated attribute
Solution: when item has deprecated attribute set hl_group to DiagnosticDeprecated
in complete function
|
|
|
|
| |
(#29522)
|
|
|
|
|
|
|
|
|
|
|
| |
Although the built-in pum completion mechanism will filter anyway on the
next input it is odd if the initial popup shows entries which don't
match the current prefix.
Using fuzzy match on the label/prefix is compatible with
`completeopt+=fuzzy` and also doesn't seem to break postfix snippet
cases
Closes https://github.com/neovim/neovim/issues/29287
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
For snippets lsp.completion prefers the label if it is shorter than the
insertText or textEdit to support postfix completion cases but clangd
adds decoration characters to labels. E.g.: `•INT16_C(c)`
Solution:
Use parse_snippet on insertText/textEdit before checking if it is
shorter than the label.
Fixes https://github.com/neovim/neovim/issues/29301
|
| |
|
|
|
|
|
| |
the `complete()` mechanism doesn't play nicely with trailing newlines or
tabs. A newline causes it to insert a null character, showing up as
`^@`.
|
| |
|
|
|
|
|
|
|
|
| |
The `complete()` mechanism matches completion candidates against
the typed text, so strict pre-filtering isn't necessary.
This is a first step towards supporting postfix snippets (like
`items@insert` in luals)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.
Closes https://github.com/neovim/neovim/issues/27004.
|
| |
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/27004.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Fixes a regression from 5e5f5174e3faa862a9bc353aa7da41487911140b
Until that commit we had a logic like this:
`local prefix = startbyte and line:sub(startbyte + 1) or line_to_cursor:sub(word_boundary)`
The commit changed the logic and no longer cut off the line at the cursor, resulting in a prefix that included trailing characters
|
|
Fixes https://github.com/neovim/neovim/issues/25177
I initially wanted to split this into a refactor commit to make it more
testable, but it appears that already accidentally fixed the issue by
normalizing lnum/col to 0-indexing
|