mirror of
https://github.com/neovim/neovim.git
synced 2026-01-07 03:48:02 +10:00
vim-patch:9.1.1779: completion: 'autocomplete' cannot be enabled per buffer (#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
0208b3e80a
Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
@@ -743,7 +743,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'autocomplete'* *'ac'* *'noautocomplete'* *'noac'*
|
||||
'autocomplete' 'ac' boolean (default off)
|
||||
global
|
||||
global or local to buffer |global-local|
|
||||
When on, Vim shows a completion menu as you type, similar to using
|
||||
|i_CTRL-N|, but triggered automatically. See |ins-autocompletion|.
|
||||
|
||||
|
||||
2
runtime/lua/vim/_meta/options.lua
generated
2
runtime/lua/vim/_meta/options.lua
generated
@@ -117,6 +117,8 @@ vim.go.acd = vim.go.autochdir
|
||||
--- @type boolean
|
||||
vim.o.autocomplete = false
|
||||
vim.o.ac = vim.o.autocomplete
|
||||
vim.bo.autocomplete = vim.o.autocomplete
|
||||
vim.bo.ac = vim.bo.autocomplete
|
||||
vim.go.autocomplete = vim.o.autocomplete
|
||||
vim.go.ac = vim.go.autocomplete
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2025 Aug 23
|
||||
" Last Change: 2025 Sep 20
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
@@ -736,6 +736,7 @@ if has("insert_expand")
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("cpt")
|
||||
call <SID>AddOption("autocomplete", gettext("automatic completion in insert mode"))
|
||||
call append("$", "\t" .. s:global_or_local)
|
||||
call <SID>BinOptionG("ac", &ac)
|
||||
call <SID>AddOption("autocompletetimeout", gettext("initial decay timeout for 'autocomplete' algorithm"))
|
||||
call append("$", " \tset act=" . &act)
|
||||
|
||||
Reference in New Issue
Block a user