aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/nvim-treesitter.lua
diff options
context:
space:
mode:
authoreric.marin <maarin.eric@gmail.com>2024-09-11 14:49:39 +0200
committereric.marin <maarin.eric@gmail.com>2024-09-11 14:59:47 +0200
commit9f20c1f313e20102dd83adeaf091284be1fd82d0 (patch)
treed3db386875af532f4fc55c275312c7c787e88f55 /nvim/lua/plugins/nvim-treesitter.lua
downloaddotfiles-9f20c1f313e20102dd83adeaf091284be1fd82d0.tar.gz
dotfiles-9f20c1f313e20102dd83adeaf091284be1fd82d0.zip
config
Diffstat (limited to 'nvim/lua/plugins/nvim-treesitter.lua')
-rw-r--r--nvim/lua/plugins/nvim-treesitter.lua47
1 files changed, 47 insertions, 0 deletions
diff --git a/nvim/lua/plugins/nvim-treesitter.lua b/nvim/lua/plugins/nvim-treesitter.lua
new file mode 100644
index 0000000..988673b
--- /dev/null
+++ b/nvim/lua/plugins/nvim-treesitter.lua
@@ -0,0 +1,47 @@
+local config = function()
+ require("nvim-treesitter.configs").setup({
+ ensure_installed = {
+ "c",
+ "lua",
+ "markdown",
+ "vim",
+ "vimdoc",
+ "query",
+
+ "regex",
+ "diff",
+ "cmake",
+ "markdown_inline",
+ "bash",
+ "toml",
+
+ "cpp",
+ "rust",
+ "haskell",
+ "nix"
+ },
+ auto_install = false,
+ highlight = {
+ enable = true,
+ additional_vim_regex_highlighting = false,
+ },
+ incremental_selection = {
+ enable = true
+ },
+ indent = {
+ enable = true,
+ },
+ autotag = {
+ enable = true,
+ },
+ })
+
+ vim.cmd(":TSUpdate")
+end
+
+return {
+ "nvim-treesitter/nvim-treesitter",
+ lazy = true,
+ event = { "BufReadPost", "BufWritePost", "BufNewFile" },
+ config = config,
+}