mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 15:00:04 -04:00
Refactor: move completion functions to autoload
This commit is contained in:
parent
b8453e63b2
commit
1ba18329c7
5 changed files with 36 additions and 35 deletions
|
|
@ -1,7 +1,19 @@
|
|||
function! nvim_treesitter#statusline(len)
|
||||
function! nvim_treesitter#statusline(len) abort
|
||||
return luaeval("require'nvim-treesitter'.statusline(_A)", a:len)
|
||||
endfunction
|
||||
|
||||
function! nvim_treesitter#foldexpr()
|
||||
function! nvim_treesitter#foldexpr() abort
|
||||
return luaeval(printf('require"nvim-treesitter.fold".get_fold_indic(%d)', v:lnum))
|
||||
endfunction
|
||||
|
||||
function! nvim_treesitter#installable_parsers(arglead, cmdline, cursorpos) abort
|
||||
return luaeval("require'nvim-treesitter.parsers'.available_parsers()") + ['all']
|
||||
endfunction
|
||||
|
||||
function! nvim_treesitter#installed_parsers(arglead, cmdline, cursorpos) abort
|
||||
return luaeval("require'nvim-treesitter.info'.installed_parsers()") + ['all']
|
||||
endfunction
|
||||
|
||||
function! nvim_treesitter#available_modules(arglead, cmdline, cursorpos) abort
|
||||
return luaeval("require'nvim-treesitter.configs'.available_modules()")
|
||||
endfunction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue