From a41a2376fb6eb13812d240ddc5f8439bffa23312 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Mon, 12 May 2025 09:47:27 +0200 Subject: [PATCH] feat: disable treesitter plugin --- lua/weeheavy/plugins/treesitter-context.lua | 3 +- lua/weeheavy/plugins/treesitter.lua | 125 ++++++++++---------- 2 files changed, 65 insertions(+), 63 deletions(-) diff --git a/lua/weeheavy/plugins/treesitter-context.lua b/lua/weeheavy/plugins/treesitter-context.lua index 86c4268..6a2991d 100644 --- a/lua/weeheavy/plugins/treesitter-context.lua +++ b/lua/weeheavy/plugins/treesitter-context.lua @@ -1,6 +1,7 @@ --- Shows context of code line +-- Shows context of code line -- Docs: https://github.com/nvim-treesitter/nvim-treesitter-context return { "nvim-treesitter/nvim-treesitter-context", event = { "BufReadPre", "BufNewFile" }, + enabled = false, } diff --git a/lua/weeheavy/plugins/treesitter.lua b/lua/weeheavy/plugins/treesitter.lua index 8246fe4..584fd59 100644 --- a/lua/weeheavy/plugins/treesitter.lua +++ b/lua/weeheavy/plugins/treesitter.lua @@ -1,66 +1,67 @@ -- Treesitter return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - event = { "BufReadPre", "BufNewFile" }, - dependencies = { - "nvim-treesitter/nvim-treesitter-textobjects", - }, - config = function() - local treesitter = require("nvim-treesitter.configs") + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + event = { "BufReadPre", "BufNewFile" }, + enabled = false, + dependencies = { + "nvim-treesitter/nvim-treesitter-textobjects", + }, + config = function() + local treesitter = require("nvim-treesitter.configs") - treesitter.setup({ - highlight = { enable = true }, - indent = { enable = true }, - auto_install = false, - -- language list: https://github.com/nvim-treesitter/nvim-treesitter#supported-languages - ensure_installed = { - "lua", - "comment", -- used for TODO/FIXME/NOTE etc - "vim", - "vimdoc", - "bash", - "diff", - "gitignore", - "markdown", - "markdown_inline", - "elixir", - "eex", - "heex", - "yaml", - "html", - "javascript", - "css", - "dockerfile", - "query", - "hcl", - "bicep", - "csv", - "properties", - "ini", - "python", - "regex", - "json", - "go", - "gomod", - "gosum", - "tcl", - "editorconfig", - "http", - "make", - "toml", - "latex", - "sql", - }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = false, - node_decremental = "", - }, - }, - }) - end, + treesitter.setup({ + highlight = { enable = true }, + indent = { enable = true }, + auto_install = false, + -- language list: https://github.com/nvim-treesitter/nvim-treesitter#supported-languages + ensure_installed = { + "lua", + "comment", -- used for TODO/FIXME/NOTE etc + "vim", + "vimdoc", + "bash", + "diff", + "gitignore", + "markdown", + "markdown_inline", + "elixir", + "eex", + "heex", + "yaml", + "html", + "javascript", + "css", + "dockerfile", + "query", + "hcl", + "bicep", + "csv", + "properties", + "ini", + "python", + "regex", + "json", + "go", + "gomod", + "gosum", + "tcl", + "editorconfig", + "http", + "make", + "toml", + "latex", + "sql", + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "", + node_incremental = "", + scope_incremental = false, + node_decremental = "", + }, + }, + }) + end, }