treesitter.lua 1.1 KB

12345678910111213141516171819202122232425
  1. require'nvim-treesitter.configs'.setup {
  2. -- A list of parser names, or "all"
  3. ensure_installed = { "help", "c", "lua", "rust", "python"},
  4. -- Install parsers synchronously (only applied to `ensure_installed`)
  5. sync_install = false,
  6. -- Automatically install missing parsers when entering buffer
  7. -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
  8. auto_install = true,
  9. ---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
  10. -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
  11. highlight = {
  12. -- `false` will disable the whole extension
  13. enable = true,
  14. -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
  15. -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
  16. -- Using this option may slow down your editor, and you may see some duplicate highlights.
  17. -- Instead of true it can also be a list of languages
  18. additional_vim_regex_highlighting = false,
  19. },
  20. }