init.lua 846 B

12345678910111213141516171819202122
  1. require'nvim-treesitter.configs'.setup {
  2. ensure_installed = O.treesitter.ensure_installed, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
  3. ignore_install = O.treesitter.ignore_install,
  4. matchup = {
  5. enable = true, -- mandatory, false will disable the whole extension
  6. -- disable = { "c", "ruby" }, -- optional, list of language that will be disabled
  7. },
  8. highlight = {
  9. enable = O.treesitter.highlight.enabled -- false will disable the whole extension
  10. },
  11. context_commentstring = {
  12. enable = true,
  13. config = {
  14. css = '// %s'
  15. }
  16. },
  17. -- indent = {enable = true, disable = {"python", "html", "javascript"}},
  18. -- TODO seems to be broken
  19. indent = {enable = {"javascriptreact"}},
  20. autotag = {enable = true},
  21. }