Skip to content

Commit

Permalink
Improve treesitter config
Browse files Browse the repository at this point in the history
  • Loading branch information
semanser committed Jan 14, 2024
1 parent d5443ad commit 642e0b4
Showing 1 changed file with 37 additions and 17 deletions.
54 changes: 37 additions & 17 deletions nvim/.config/nvim/lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
opts = {
ensure_installed = "all", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
ignore_install = {}, -- List of parsers to ignore installing
highlight = {
enable = true, -- false will disable the whole extension
disable = {}, -- list of language that will be disabled
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
-- additional_vim_regex_highlighting = true,
},
indent = {
enable = false,
},
{
"nvim-treesitter/nvim-treesitter",
event = "VeryLazy",
build = ":TSUpdate",
config = function()
local configs = require("nvim-treesitter.configs")

configs.setup({
ensure_installed = {
"lua",
"sql",
"javascript",
"go",
"xml",
"json",
"typescript",
"tsx",
"html",
"css",
"yaml",
"toml",
"rust",
"bash",
"python",
"dockerfile",
"vue",
"svelte",
"php",
"java",
"regex",
"query",
},
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end,
},
}

0 comments on commit 642e0b4

Please sign in to comment.