nvim-treesitter.lua 506 B

12345678910111213141516
  1. local status, treesitter = pcall(require, "nvim-treesitter.configs")
  2. if not status then
  3. vim.notify("没有找到 nvim-treesitter")
  4. return
  5. end
  6. treesitter.setup({
  7. -- 安装 language parser
  8. -- :TSInstallInfo 命令查看支持的语言
  9. ensure_installed = { "json", "html", "css", "vim", "lua", "javascript", "typescript", "tsx", "python", "scss", "vue" },
  10. -- 启用代码高亮模块
  11. highlight = {
  12. enable = true,
  13. additional_vim_regex_highlighting = false
  14. }
  15. })