summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2026-04-19 00:52:01 +0200
committerache <ache@ache.one>2026-04-19 00:52:01 +0200
commit43fca7bc4543766d5f328ab8bd5ac65e0573029e (patch)
tree6e0a00f94f665c7e289895877d32a3f9c50f604f
parentfix: Fix LuaSnip moves (diff)
fix: Fix C indent by removing the treesitter support :(master
-rw-r--r--lua/ache/plugins/treesitter.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/lua/ache/plugins/treesitter.lua b/lua/ache/plugins/treesitter.lua
index df133d0..5ef3525 100644
--- a/lua/ache/plugins/treesitter.lua
+++ b/lua/ache/plugins/treesitter.lua
@@ -29,12 +29,8 @@ return {
},
indent = {
enable = true,
- disable = {},
+ disable = { "c" }, -- C indent is bugged :'(
},
- -- TODO: Install nvim-ts-autotag
- -- autotag = { -- With nvim-ts-autotag plugin
- -- enable = true,
- -- },
--[[
rainbow = {
enable = true,
@@ -123,6 +119,7 @@ return {
-- vim.wo[0][0].foldlevel = 9
-- vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
+ -- WARN: If there is folding problem with python, refresh with <leader>z
vim.keymap.set("n", "<leader>z", function()
vim.cmd([[set foldexpr=nvim_treesitter#foldexpr()]])
end, { desc = "Refresh folding from Treesitter" })
@@ -130,9 +127,12 @@ return {
-- Use treesitter for auto-fold
-- Create an autocommand for "BufRead" events
+ -- WARN: Fix Python folding
vim.api.nvim_create_autocmd("FileType", {
-- This autocommand will only trigger if the buffer name matches the following patterns
- -- pattern = { "*.yaml", "*.yml" },
+ -- NOTE: Oddly, the pattern MUST be commented, them it will run on every file
+ -- if the pattern is applied, it doesn't work anymore for python. 🤷
+ -- pattern = { "*.py", "*.yml", "*.yaml" },
-- The autocommand will trigger the following lua function
callback = function()
local parsers = require("nvim-treesitter.parsers")