mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
Completion: use custom instead of customlist
Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/396
This commit is contained in:
parent
9e22864d03
commit
7a1f6b1586
4 changed files with 12 additions and 12 deletions
|
|
@ -7,13 +7,13 @@ function! nvim_treesitter#foldexpr() abort
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! nvim_treesitter#installable_parsers(arglead, cmdline, cursorpos) abort
|
function! nvim_treesitter#installable_parsers(arglead, cmdline, cursorpos) abort
|
||||||
return luaeval("require'nvim-treesitter.parsers'.available_parsers()") + ['all']
|
return join(luaeval("require'nvim-treesitter.parsers'.available_parsers()") + ['all'], "\n")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! nvim_treesitter#installed_parsers(arglead, cmdline, cursorpos) abort
|
function! nvim_treesitter#installed_parsers(arglead, cmdline, cursorpos) abort
|
||||||
return luaeval("require'nvim-treesitter.info'.installed_parsers()") + ['all']
|
return join(luaeval("require'nvim-treesitter.info'.installed_parsers()") + ['all'], "\n")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! nvim_treesitter#available_modules(arglead, cmdline, cursorpos) abort
|
function! nvim_treesitter#available_modules(arglead, cmdline, cursorpos) abort
|
||||||
return luaeval("require'nvim-treesitter.configs'.available_modules()")
|
return join(luaeval("require'nvim-treesitter.configs'.available_modules()"), "\n")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
||||||
|
|
@ -251,28 +251,28 @@ M.commands = {
|
||||||
run = enable_module,
|
run = enable_module,
|
||||||
args = {
|
args = {
|
||||||
"-nargs=1",
|
"-nargs=1",
|
||||||
"-complete=customlist,nvim_treesitter#available_modules",
|
"-complete=custom,nvim_treesitter#available_modules",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
TSBufDisable = {
|
TSBufDisable = {
|
||||||
run = disable_module,
|
run = disable_module,
|
||||||
args = {
|
args = {
|
||||||
"-nargs=1",
|
"-nargs=1",
|
||||||
"-complete=customlist,nvim_treesitter#available_modules",
|
"-complete=custom,nvim_treesitter#available_modules",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
TSEnableAll = {
|
TSEnableAll = {
|
||||||
run = enable_all,
|
run = enable_all,
|
||||||
args = {
|
args = {
|
||||||
"-nargs=+",
|
"-nargs=+",
|
||||||
"-complete=customlist,nvim_treesitter#available_modules",
|
"-complete=custom,nvim_treesitter#available_modules",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
TSDisableAll = {
|
TSDisableAll = {
|
||||||
run = disable_all,
|
run = disable_all,
|
||||||
args = {
|
args = {
|
||||||
"-nargs=+",
|
"-nargs=+",
|
||||||
"-complete=customlist,nvim_treesitter#available_modules",
|
"-complete=custom,nvim_treesitter#available_modules",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ M.commands = {
|
||||||
run = module_info,
|
run = module_info,
|
||||||
args = {
|
args = {
|
||||||
"-nargs=?",
|
"-nargs=?",
|
||||||
"-complete=customlist,nvim_treesitter#available_modules",
|
"-complete=custom,nvim_treesitter#available_modules",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -235,28 +235,28 @@ M.commands = {
|
||||||
run = install(false, true),
|
run = install(false, true),
|
||||||
args = {
|
args = {
|
||||||
"-nargs=+",
|
"-nargs=+",
|
||||||
"-complete=customlist,nvim_treesitter#installable_parsers",
|
"-complete=custom,nvim_treesitter#installable_parsers",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
TSInstallSync = {
|
TSInstallSync = {
|
||||||
run = install(true, true),
|
run = install(true, true),
|
||||||
args = {
|
args = {
|
||||||
"-nargs=+",
|
"-nargs=+",
|
||||||
"-complete=customlist,nvim_treesitter#installable_parsers",
|
"-complete=custom,nvim_treesitter#installable_parsers",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
TSUpdate = {
|
TSUpdate = {
|
||||||
run = M.update,
|
run = M.update,
|
||||||
args = {
|
args = {
|
||||||
"-nargs=*",
|
"-nargs=*",
|
||||||
"-complete=customlist,nvim_treesitter#installed_parsers",
|
"-complete=custom,nvim_treesitter#installed_parsers",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
TSUninstall = {
|
TSUninstall = {
|
||||||
run = M.uninstall,
|
run = M.uninstall,
|
||||||
args = {
|
args = {
|
||||||
"-nargs=+",
|
"-nargs=+",
|
||||||
"-complete=customlist,nvim_treesitter#installed_parsers",
|
"-complete=custom,nvim_treesitter#installed_parsers",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue