patch 9.1.1340: cannot complete :filetype arguments

Problem:  cannot complete :filetype arguments (Phạm Bình An)
Solution: add :filetype ex command completion, add "filetypecmd"
          completion type for getcompletion()

fixes: #17165
closes: #17167

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2025-04-23 21:04:24 +02:00
parent 031f2273cb
commit a3422aa317
7 changed files with 123 additions and 1 deletions

View File

@ -4270,6 +4270,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
file file and directory names
file_in_path file and directory names in |'path'|
filetype filetype names |'filetype'|
filetypecmd |:filetype| suboptions
function function name
help help subjects
highlight highlight groups

View File

@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2025 Apr 21
*version9.txt* For Vim version 9.1. Last change: 2025 Apr 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -41624,6 +41624,8 @@ Completion: ~
"o" - complete using 'omnifunc'
- allow to limit matches for the 'complete' sources by using the
"{flag}^<limit>" notation
- add ":filetype" command completion
- add "filetypecmd" completion type for |getcompletion()|
Options: ~
- the default for 'commentstring' contains whitespace padding to have