This website requires JavaScript.
Explore
Help
Sign In
xenia
/
kakoune
Watch
1
Star
0
Fork
0
You've already forked kakoune
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
1a4737cd20
kakoune
/
test
/
regression
/
0-autocomplete-overrules-completers
/
in
5 lines
4 B
Raw
Normal View
History
Unescape
Escape
Do not show custom completions when autocomplete is off As reported in [1], completions provided by "set global completers option=my_completion" activate insert mode autocompletion, even when the autocomplete option does not have the insert mode flag. This happens because InsertCompleter::on_option_changed() calls InsertCompleter::setup_ifn(), which shows the completion pager. Fix this by computing whether the completion pager is enabled; otherwise we can return early from setup_ifn(). The completion pager is enabled if the autocompletion bit is set, or if the user has requested explicit completion. [1]: https://github.com/kak-lsp/kak-lsp/issues/585
2022-01-03 22:43:04 +01:00
Make <c-n> show completion menu again when autocomplete is off As pointed out in [1], when insert mode autocomplete is disabled, <c-n> could be used to activate insert mode completions temporarily [2]. This regressed in 6f7c5aed (Do not show custom completions when autocomplete is off, 2022-01-03). Fix this by enabling completions on <c-n>/<c-p>. This allows us to remove a special case for explicit completers. Alternative behavior (future?): make <c-n> toggle completion like <c-o>. This can be done today, as suggested by Screwtape on IRC: map global insert <c-n> %{<c-o><c-n><a-;>:toggle-ctrl-n<ret>} define-command toggle-ctrl-n %{ hook global InsertCompletionShow .* %{ map window insert <c-n> <c-n> } hook global InsertCompletionHide .* %{ unmap window insert <c-n> <c-n> } } [1] https://github.com/mawww/kakoune/pull/4493#issuecomment-1031189823 [2] <c-n> completion only lives for the lifetime of the completion menu, whereas <c-o> lasts until you exit insert mode. This means that autocompletion is much more convenient than <c-n> or <c-x>f, because those require an explicit completion request for each path component.
2022-02-07 13:31:56 +01:00
Reference in New Issue
Copy Permalink
Mastodon