From 70ce2131d5bfc1b5f96333c5c9f92c4a39110ebd Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 23 Mar 2025 16:26:13 +0100 Subject: [PATCH] nvim/lua/user/plugins/editor/treesitter.lua: adding dotenv parser --- nvim/lua/user/plugins/editor/treesitter.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nvim/lua/user/plugins/editor/treesitter.lua b/nvim/lua/user/plugins/editor/treesitter.lua index e6c7574..de964a1 100644 --- a/nvim/lua/user/plugins/editor/treesitter.lua +++ b/nvim/lua/user/plugins/editor/treesitter.lua @@ -56,6 +56,21 @@ return { filetype = "blade", } + parser_config.dotenv = { + install_info = { + url = "https://github.com/pnx/tree-sitter-dotenv", + branch = "main", + files = { "src/parser.c", "src/scanner.c" }, + }, + filetype = "dotenv", + } + + vim.filetype.add({ + pattern = { + ['.env.*'] = 'dotenv', + }, + }) + require("nvim-treesitter.configs").setup(opts) end, },