init.lua 888 B

123456789101112131415161718192021
  1. require'nvim-treesitter.configs'.setup {
  2. ensure_installed = "all", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
  3. -- TODO seems to be broken
  4. ignore_install = {"haskell"},
  5. highlight = {
  6. enable = true -- false will disable the whole extension
  7. },
  8. -- indent = {enable = true, disable = {"python"}},
  9. indent = {enable = {"javascriptreact"}},
  10. playground = {
  11. enable = true,
  12. disable = {},
  13. updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
  14. persist_queries = false -- Whether the query persists across vim sessions
  15. },
  16. autotag = {enable = true},
  17. rainbow = {enable = true},
  18. context_commentstring = {enable = true, config = {javascriptreact = {style_element = '{/*%s*/}'}}}
  19. -- refactor = {highlight_definitions = {enable = true}}
  20. }