plugin_config.lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. local function config()
  2. require 'nvim-treesitter.configs'.setup {
  3. ensure_installed = {
  4. 'bash',
  5. 'c_sharp',
  6. 'clojure',
  7. 'cmake',
  8. 'css',
  9. 'dockerfile',
  10. 'gitattributes',
  11. 'gitignore',
  12. 'go',
  13. 'gomod',
  14. 'gowork',
  15. 'graphql',
  16. 'html',
  17. 'http',
  18. 'java',
  19. 'javascript',
  20. 'jsdoc',
  21. 'json',
  22. 'json5',
  23. 'kotlin',
  24. 'latex',
  25. 'lua',
  26. 'make',
  27. 'markdown',
  28. 'markdown_inline',
  29. 'python',
  30. 'regex',
  31. 'rust',
  32. 'scss',
  33. 'sql',
  34. 'svelte',
  35. 'toml',
  36. 'tsx',
  37. 'typescript',
  38. 'vim',
  39. 'vue',
  40. 'yaml',
  41. },
  42. -- Install parsers synchronously (only applied to `ensure_installed`)
  43. sync_install = true,
  44. -- Automatically install missing parsers when entering buffer
  45. auto_install = true,
  46. ---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
  47. -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
  48. highlight = {
  49. -- `false` will disable the whole extension
  50. enable = true,
  51. -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
  52. -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
  53. -- the name of the parser)
  54. -- list of language that will be disabled
  55. -- disable = { "c", "rust" },
  56. -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
  57. -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
  58. -- Using this option may slow down your editor, and you may see some duplicate highlights.
  59. -- Instead of true it can also be a list of languages
  60. additional_vim_regex_highlighting = false,
  61. },
  62. }
  63. end
  64. config()