feat(install): add "maintained" option to only install maintained parsers

Unmaintained parsers only give users little benefit but take sometimes a
a long time to install (e.g. Markdown, Julia, Haskell parser). We could
recommend to only install maintained parsers by default.
This commit is contained in:
Stephan Seitz 2020-09-27 12:13:11 +02:00 committed by Stephan Seitz
parent 04ff77442a
commit c3b526fe51
5 changed files with 16 additions and 5 deletions

View file

@ -7,11 +7,11 @@ function! nvim_treesitter#foldexpr() abort
endfunction
function! nvim_treesitter#installable_parsers(arglead, cmdline, cursorpos) abort
return join(luaeval("require'nvim-treesitter.parsers'.available_parsers()") + ['all'], "\n")
return join(luaeval("require'nvim-treesitter.parsers'.available_parsers()") + ['all', 'maintained'], "\n")
endfunction
function! nvim_treesitter#installed_parsers(arglead, cmdline, cursorpos) abort
return join(luaeval("require'nvim-treesitter.info'.installed_parsers()") + ['all'], "\n")
return join(luaeval("require'nvim-treesitter.info'.installed_parsers()") + ['all', 'maintained'], "\n")
endfunction
function! nvim_treesitter#available_modules(arglead, cmdline, cursorpos) abort