| Age | Commit message (Collapse) | Author | Files |
|
|
|
docs: lsp, options
- revert bogus change to `_meta/builtin_types.lua` from 3a4a66017b74
Close #38991
Co-authored-by: David Mejorado <david.mejorado@gmail.com>
|
|
Problem: compl_preselect_match is set even when completeopt doesn't
include preselect.
Solution: Check kOptCotFlagPreselect in ins_compl_add before setting
compl_preselect_match.
|
|
Problem:
LSP CompletionItem.preselect is not supported.
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionClientCapabilities
Solution:
- Add "preselect" field to complete-items and "preselect" flag
to 'completeopt'.
- Set preselectSupport=true in LSP client capabilities.
|
|
|
|
Problem: completion: segfault during file name completion
Solution: Initialize compl_num_bests (Girish Palya)
closes: vim/vim#19134
https://github.com/vim/vim/commit/4895ae8c0cd144c98cfb05e0162c2caac8f63c4c
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
Problem:
On MSWIN, file completion (CTRL-X CTRL-F) only works for the current
drive (so not for actual absolute paths), since drive letters are never
included in the completion pattern.
e.g. when completing "F:\Hello" Nvim currently completes "\Hello"
which is relative to the current drive/volume.
vim solves this by adding ':' to the default 'isfname' value on mswin,
but that causes issues as ':' is not a valid windows path char anywhere
_except_ after the drive letter.
Solution:
detect drive letters in front of the path when creating the completion
pattern.
|
|
Problem: completion: some issues with 'acl' when "preinsert" and
"longest" is in 'completeopt' (musonius, after v9.1.1638)
Solution: Fix various issues (see details below) (Girish Palya)
This commit addresses multiple issues in the 'autocompletedelay' behavior with
"preinsert" and "longest":
- Prevents spurious characters from being inserted.
- Ensures the completion menu is not shown until `autocompletedelay` has
expired.
- Shows the "preinsert" effect immediately.
- Keeps the "preinsert" effect visible even when a character is deleted.
fixes: vim/vim#18443
closes: vim/vim#18460
https://github.com/vim/vim/commit/f77c187277c3fd2af7a48f8b15093a3e40ca95a0
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
completeopt=longest,preinsert
Problem: completion: strange behaviour with 'ac'
completeopt=longest,preinsert (zeertzjq)
Solution: Let preinsert take precedence (Girish Palya)
fixes: vim/vim#18410
closes: vim/vim#18428
https://github.com/vim/vim/commit/d35e5e4237ec578962d3d577bc5a4e4f6bf4abb2
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
Problem: completion: autocompletion can be improved
Solution: Add support for "longest" and "preinsert" in 'autocomplete';
add preinserted() (Girish Palya)
* Add support for "longest" in 'completeopt' when 'autocomplete'
is enabled. (Note: the cursor position does not change automatically
when 'autocomplete' is enabled.)
* Add support for "preinsert" when 'autocomplete' is enabled. Ensure
"preinsert" works the same with and without 'autocomplete'
* introduce the preinserted() Vim script function, useful for defining
custom key mappings.
fixes: vim/vim#18314
closes: vim/vim#18387
https://github.com/vim/vim/commit/c05335082adb21d99d96374779856444a3a0688f
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
|
|
(#35853)
Problem: completion: 'autocomplete' cannot be enabled per buffer
(Tomasz N)
Solution: Make 'autocomplete' global or local to buffer (Girish Palya)
fixes: vim/vim#18320
closes: vim/vim#18333
https://github.com/vim/vim/commit/0208b3e80a080740ff77a5661d0f65090e317d90
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
'autocomplete' (#35835)
Problem: completion: inconsistent selection of first item with
'autocomplete' (Tomasz N)
Solution: Check for 'autocomplete' option in ins_compl_new_leader()
(Girish Palya).
fixes: vim/vim#18326
closes: vim/vim#18329
https://github.com/vim/vim/commit/86e8e909f2e8cc1f851b4b62c3060c86c1afae65
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
Problem: completion: preinserted text highlighed using ComplMatchIns
Solution: Use highlighting group PreInsert and update the documentation
(Girish Palya).
When "preinsert" is included in 'completeopt', only the PreInsert
highlight group should be applied, whether autocompletion is active or not.
Previously, ComplMatchIns was used when autocompletion was not enabled.
Related to https://github.com/vim/vim/pull/18213.
closes: vim/vim#18254
https://github.com/vim/vim/commit/2525c56e423b3ddce8de925f582b9c4d00079675
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
Change timeout from 200ms to 400ms, which is still 100ms lower than the
'autocompletedelay' value.
|
|
(#35452)
Problem: tests: no test for actually moving cursor when menu is not
open with 'autocompletedelay'.
Solution: Use <Up> first in the test. Also remove two unnecessary <Esc>s
in completion timeout test (zeertzjq).
closes: vim/vim#18097
https://github.com/vim/vim/commit/e8b99ff6d58b69639c29756edbfc655af38f9f03
|
|
Problem: Autocompletion adds delay
(gcanat, char101, after v9.1.1638)
Solution: Temporarily disable autocomplation (Girish Palya).
related: vim/vim#17960
fixes: vim/vim#18022
closes: vim/vim#18048
https://github.com/vim/vim/commit/196c376682f9ebad0d13a8d5458accfb33372537
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
Problem: completion: not possible to delay the autcompletion
Solution: add the 'autocompletedelay' option value (Girish Palya).
This patch introduces a new global option 'autocompletedelay'/'acl' that
specifies the delay, in milliseconds, before the autocomplete menu
appears after typing.
When set to a non-zero value, Vim waits for the specified time before
showing the completion popup, allowing users to reduce distraction from
rapid suggestion pop-ups or to fine-tune the responsiveness of
completion.
The default value is 0, which preserves the current immediate-popup
behavior.
closes: vim/vim#17960
https://github.com/vim/vim/commit/a09b1604d4fe7516d87fbcbf2ffd2dc484799b23
N/A patch: vim-patch:9.1.1641: a few compiler warnings are output
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
|
|
Problem: The ruler disappears after typing the second character during
insert mode completion, even when completion messages are
suppressed ('shortmess' includes "c"). This makes the UI
appear inconsistent.
Solution: Ensure the ruler is restored during screen redraw when popup
completion is active (Girish Palya).
Notes:
No new tests were added, as existing screen dump tests were updated to
reflect the corrected behavior.
closes: vim/vim#17770
https://github.com/vim/vim/commit/824286c9a727811ed93e4e2f4f10944f735436e7
Nvim already behaves correctly as the popup menu is a separate grid in
the compositor.
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
Problem: completion: messages don't respect 'shm' setting
Solution: Turn off completion messages when 'shortmess' includes "c"
(Girish Palya).
`:set shortmess+=c` is intended to reduce noise during completion by
suppressing messages.
Previously, some completion messages still appeared regardless of this setting.
This change ensures that **all** completion-related messages are suppressed
when `'c'` is present in `'shortmess'`.
Not entirely sure if the original behavior was intentional. If there's a
reason certain messages were always shown, feel free to close this without
merging.
closes: vim/vim#17737
https://github.com/vim/vim/commit/fe1d3c8af764831aa51a8922ce24a7cfd9e6129d
Co-authored-by: Girish Palya <girishji@gmail.com>
|
|
(#34198)
Problem: not easily possible to complete from register content
Solution: add register-completion submode using i_CTRL-X_CTRL-R
(glepnir)
closes: vim/vim#17354
https://github.com/vim/vim/commit/0546068aaef2b1a40faa2945ef7eba249739f219
|
|
Problem: As in f85bc41, assume unfocusable windows to be UI windows
whose buffer content is unexpectedly included in 'complete'
"w" completion.
Solution: Exclude unfocusable windows when looping over windows.
|
|
Problem:
`:lua vim.lsp.c<tab>` does not list vim.lsp.completion in the completion
list after 24cea4c7f7417c7fe99a98a0487f51dd68c4f409.
Solution:
- Always include `vim.lsp._submodule` keys in candidates.
- Fixes `vim.lsp.c<tab>` -> `vim.lsp.completion`.
- Eager-load `vim.lsp.completion` to get its completion.
- Fixes `vim.lsp.completion.g<tab>` -> `vim.lsp.completion.get`.
|
|
Problem:
`feed_command()` was added as a "bridge" for old test code. 99% of those
cases should be using `n.command()`, which raises errors instead of
silently continuing the test.
Solution:
Deprecate `feed_command()`. It should not be used in new tests.
All usages of `feed_command()` should be converted to `command()` or
`feed()`.
|
|
|
|
Problem: Enter does not insert newline with "noselect" when the pum is
visible (lifepillar)
Solution: When Enter is pressed and no complete-item is selected,
ins_compl_prep returns false, and the edit function continues
processing Enter to insert a new line. (glepnir)
fixes: vim/vim#1653
closes: vim/vim#16653
https://github.com/vim/vim/commit/07f0dbe3aa326fdf4d0f1b1cf7d79df89e91fc6e
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
Problem:
If completeopt does not include "popup" flag, nvim__complete_set still
auto-creates a floating preview window.
Solution:
Fail if completeopt does not include the "popup" flag.
|
|
Problem: When completion leader changes, text that might be reinserted
immediately after is deleted. This unnecessarily affects
extmarks. #31387 restored the original extmarks but that
prevents end_right_gravity marks from growing.
Solution: Avoid deleting leader text that will be reinserted.
|
|
- move credits and backers to credits.txt
|
|
Problem:
Built-in completion can still affect nearby extmarks. #31384
Solution:
Restore extmarks when completion leader changes.
|
|
Before calling "attach" a screen object is just a dummy container for
(row, col) values whose purpose is to be sent as part of the "attach"
function call anyway.
Just create the screen in an attached state directly. Keep the complete
(row, col, options) config together. It is still completely valid to
later detach and re-attach as needed, including to another session.
|
|
|
|
Problem: Behavior of Enter in completion depends on typing speed.
Solution: Don't make whether Enter selects original text depend on
whether completion has been interrupted, which can happen
interactively with a slow completion function.
|
|
|
|
Also change the initial value of `status` to `FAIL`, as that'll avoid
unnecessary assignments.
|
|
Do the expansion right after setting the expand context, so that the
length of the completion prefix can be set, but don't do that directly
in set_one_cmd_context(), as that's also called by getcmdcompltype().
|
|
|
|
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.
|
|
Problem: Segfault with CompleteChanged autocommand
(markonm )
Solution: Test match->cp_prev for being NULL before accessing it
closes: vim/vim#13929
https://github.com/vim/vim/commit/fef66301665027f1801a18d796f74584666f41ef
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
- remove helpers.cur*meths
- remove helpers.nvim
|
|
|
|
|
|
|
|
There is no reason for this file to be in project root, which is crowded
as is. This also fits nicely part of the ongoing work towards gathering
as much of the documentation as possible into one place.
|
|
This is the command invoked repeatedly to make the changes:
:%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
|
|
|