mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat/refacto: improve configurations
- 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
This commit is contained in:
parent
b7fdd6ae38
commit
62786ec7c6
8 changed files with 453 additions and 112 deletions
|
|
@ -4,14 +4,17 @@ if exists('g:loaded_nvim_treesitter')
|
|||
finish
|
||||
endif
|
||||
|
||||
lua << EOF
|
||||
ts_installable_parsers = function()
|
||||
return table.concat(require'nvim-treesitter'.available_parsers(), '\n')
|
||||
end
|
||||
require'nvim-treesitter'._root.setup()
|
||||
EOF
|
||||
augroup NvimTreesitter
|
||||
augroup END
|
||||
|
||||
let g:loaded_nvim_treesitter = 1
|
||||
|
||||
augroup NvimTreesitter
|
||||
augroup END
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue