aboutsummaryrefslogtreecommitdiff
path: root/dot_config/nvim/lua/plugins/treesitter.lua
diff options
context:
space:
mode:
authorpablu <me@pablu.de>2026-03-22 18:04:35 +0100
committerpablu <me@pablu.de>2026-03-22 18:04:35 +0100
commit1d5ca0aa2971d2485575ed7c5efad17144cb3fb1 (patch)
tree325017afee1cc8cde6808fa390e26394528bdfc1 /dot_config/nvim/lua/plugins/treesitter.lua
Initial commit
Diffstat (limited to 'dot_config/nvim/lua/plugins/treesitter.lua')
-rw-r--r--dot_config/nvim/lua/plugins/treesitter.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua
new file mode 100644
index 0000000..cf947b9
--- /dev/null
+++ b/dot_config/nvim/lua/plugins/treesitter.lua
@@ -0,0 +1,25 @@
+return {
+ "nvim-treesitter/nvim-treesitter",
+ build = ":TSUpdate",
+ config = function()
+ require("nvim-treesitter.configs").setup({
+ ensure_installed = { "lua", "go", "zig", "markdown", "json", "yaml", "javascript",
+ "typescript", "bash", "python", "c_sharp", "cpp", "gleam", "svelte" },
+ indent = { enable = true },
+ sync_install = false,
+
+ highlight = { enable = true },
+ })
+
+ local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs()
+ treesitter_parser_config.templ = {
+ install_info = {
+ url = "https://github.com/vrischmann/tree-sitter-templ.git",
+ files = { "src/parser.c", "src/scanner.c" },
+ branch = "master",
+ },
+ }
+
+ vim.treesitter.language.register("templ", "templ")
+ end
+}