aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-12 07:11:54 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-07-12 07:39:36 +0800
commit83f42aa450582594f0be044c9f0710809ef0f93d (patch)
tree6625e078592d6139f2ebdd1de699e4f28b62050d /runtime
parentf1827d877d3dece7d743e9db28384ebd5e10550c (diff)
downloadrneovim-83f42aa450582594f0be044c9f0710809ef0f93d.tar.gz
rneovim-83f42aa450582594f0be044c9f0710809ef0f93d.tar.bz2
rneovim-83f42aa450582594f0be044c9f0710809ef0f93d.zip
vim-patch:9.1.0568: Cannot expand paths from 'cdpath' setting
Problem: Cannot expand paths from 'cdpath' setting (Daniel Hahler) Solution: Implement 'cdpath' completion, add the new 'dir_in_path' completion type (LemonBoy) fixes vim/vim#374 closes: vim/vim#15205 https://github.com/vim/vim/commit/a20bf69a3b32024cb7809be87af33bf9dc490a19 Co-authored-by: LemonBoy <thatlemon@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/builtin.txt1
-rw-r--r--runtime/doc/map.txt1
-rw-r--r--runtime/lua/vim/_meta/vimfn.lua1
-rw-r--r--runtime/syntax/vim.vim2
4 files changed, 4 insertions, 1 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 334531cec7..de8bfc3aff 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -2412,6 +2412,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
customlist,{func} custom completion, defined via {func}
diff_buffer |:diffget| and |:diffput| completion
dir directory names
+ dir_in_path directory names in |'cdpath'|
environment environment variable names
event autocommand events
expression Vim expression
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index f5cbb7b732..ce2fbda045 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1385,6 +1385,7 @@ completion can be enabled:
-complete=command Ex command (and arguments)
-complete=compiler compilers
-complete=dir directory names
+ -complete=dir_in_path directory names in |'cdpath'|
-complete=environment environment variable names
-complete=event autocommand events
-complete=expression Vim expression
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua
index d9bd683bbb..b18ca1ecf8 100644
--- a/runtime/lua/vim/_meta/vimfn.lua
+++ b/runtime/lua/vim/_meta/vimfn.lua
@@ -2942,6 +2942,7 @@ function vim.fn.getcmdwintype() end
--- customlist,{func} custom completion, defined via {func}
--- diff_buffer |:diffget| and |:diffput| completion
--- dir directory names
+--- dir_in_path directory names in |'cdpath'|
--- environment environment variable names
--- event autocommand events
--- expression Vim expression
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index e5b0c24447..4262636496 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -353,7 +353,7 @@ endif
syn case ignore
syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister]
" GEN_SYN_VIM: vimUserAttrbCmplt, START_STR='syn keyword vimUserAttrbCmplt contained', END_STR=''
-syn keyword vimUserAttrbCmplt contained arglist augroup behave buffer color command compiler cscope diff_buffer dir environment event expression file file_in_path filetype function help highlight history keymap locale mapclear mapping menu messages syntax syntime option packadd runtime shellcmd sign tag tag_listfiles user var breakpoint scriptnames
+syn keyword vimUserAttrbCmplt contained arglist augroup behave buffer color command compiler cscope diff_buffer dir environment event expression file file_in_path filetype function help highlight history keymap locale mapclear mapping menu messages syntax syntime option packadd runtime shellcmd sign tag tag_listfiles user var breakpoint scriptnames dir_in_path
syn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError
syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%([.#]\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError