all repos

init.lua @ 5492ab0

my nvim config

init.lua/lua/plugins/treesitter.lua(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
return {
  "nvim-treesitter/nvim-treesitter",
  event = "BufReadPost",
  dependencies = {
    "RRethy/nvim-treesitter-endwise",
    "p00f/nvim-ts-rainbow",
    { "nvim-treesitter/nvim-treesitter-context", config = true },
    { "nvim-treesitter/playground" },
  },
  build = function()
    pcall(function()
      vim.cmd "TSUpdate"
    end)
  end,
  config = function()
    require("nvim-treesitter.configs").setup {
      ensure_installed = {
        "lua",
        "go",
        "gomod",
        "gowork",
        "gosum",
        "fish",
        "gitignore",
        "gitcommit",
        "query",
      },
      indent = { enable = true, disable = { "python" } },
      highlight = { enable = true, additional_vim_regex_highlighting = false },
      autopairs = { enable = true },
      endwise = { enable = true },
      rainbow = { enable = true },
    }
  end,
}