mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
- You should now get the configs through functions - Configs for languages are now inside a local object called parsers - You can get the parser installation configurations with `get_parser_configs` - A new object has been initialized inside configs to specify module config (called config). - Provide functions to enable/disable a module on one buffer - Provide functions to enable/disable a module on all buffers, and if filetype is specified, for specific filetype - Provide function to determine if module is activated for a specified filetype
20 lines
444 B
VimL
20 lines
444 B
VimL
" Last Change: 2020 avril 19
|
|
|
|
if exists('g:loaded_nvim_treesitter')
|
|
finish
|
|
endif
|
|
|
|
augroup NvimTreesitter
|
|
augroup END
|
|
|
|
let g:loaded_nvim_treesitter = 1
|
|
|
|
lua << EOF
|
|
ts_installable_parsers = function()
|
|
return table.concat(require'nvim-treesitter.configs'.available_parsers(), '\n')
|
|
end
|
|
ts_available_modules = function()
|
|
return table.concat(require'nvim-treesitter.configs'.available_modules(), '\n')
|
|
end
|
|
require'nvim-treesitter'.setup()
|
|
EOF
|