mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:9.0.1798: The 'syntax' option has no completion. (#24908)
Problem: The 'syntax' option has no completion.
Solution: Add syntax option completion.
closes: vim/vim#12900
6dfdff3f27
N/A patches:
vim-patch:9.0.1795: Indentation issues
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
parent
d7d3d757c1
commit
6b12eda220
@ -5394,6 +5394,11 @@ void set_context_in_set_cmd(expand_T *xp, char *arg, int opt_flags)
|
||||
|
||||
xp->xp_pattern = p + 1;
|
||||
|
||||
if (options[opt_idx].var == &p_syn) {
|
||||
xp->xp_context = EXPAND_OWNSYNTAX;
|
||||
return;
|
||||
}
|
||||
|
||||
if (flags & P_EXPAND) {
|
||||
p = options[opt_idx].var;
|
||||
if (p == (char *)&p_bdir
|
||||
|
@ -378,6 +378,12 @@ func Test_set_completion()
|
||||
call assert_equal('"set filetype=sshdconfig', @:)
|
||||
call feedkeys(":set filetype=a\<C-A>\<C-B>\"\<CR>", 'xt')
|
||||
call assert_equal('"set filetype=' .. getcompletion('a*', 'filetype')->join(), @:)
|
||||
|
||||
" Expand values for 'syntax'
|
||||
call feedkeys(":set syntax=sshdconfi\<Tab>\<C-B>\"\<CR>", 'xt')
|
||||
call assert_equal('"set syntax=sshdconfig', @:)
|
||||
call feedkeys(":set syntax=a\<C-A>\<C-B>\"\<CR>", 'xt')
|
||||
call assert_equal('"set syntax=' .. getcompletion('a*', 'syntax')->join(), @:)
|
||||
endfunc
|
||||
|
||||
func Test_set_option_errors()
|
||||
|
Loading…
Reference in New Issue
Block a user