treesitter.lua 659 B

123456789101112131415
  1. -- 配置代码高亮,mac 苹果芯片,ensure_install 需要通过默认终端来启动安装,否则会一直报错
  2. return {
  3. {
  4. "nvim-treesitter/nvim-treesitter",
  5. build = ":TSUpdate",
  6. config = function()
  7. local config = require("nvim-treesitter.configs")
  8. config.setup({
  9. ensure_installed = { "bash", "toml", "luap", "luadoc", "markdown", "tsx", "c", "lua", "vim", "vimdoc", "query", "javascript", "dart", "go", "html", "java", "json", "json5", "kotlin", "python", "rust", "scss", "sql", "typescript", "vue", "xml", "yaml" },
  10. highlight = { enable = true },
  11. indent = { enable = true }
  12. })
  13. end
  14. }
  15. }