diff --git a/dev/nvim-ts.nix b/dev/nvim-ts.nix index f82090a..9167df2 100644 --- a/dev/nvim-ts.nix +++ b/dev/nvim-ts.nix @@ -38,6 +38,16 @@ let }, }) + -- Fold level + vim.opt.foldlevel = 99 + vim.opt.foldlevelstart = 99 + vim.opt.foldminlines = 1 + vim.opt.foldnestmax = 5 + vim.opt.foldmethod = "expr" + vim.cmd([[ + set foldexpr=nvim_treesitter#foldexpr() + ]]) + vim.g.catppuccin_flavour = "frappe" require("catppuccin").setup() vim.cmd([[colorscheme catppuccin]]) diff --git a/queries/folds.scm b/queries/folds.scm new file mode 100644 index 0000000..9e22961 --- /dev/null +++ b/queries/folds.scm @@ -0,0 +1,5 @@ +[ + (block) + (class_block) + (text_block) +] @fold diff --git a/queries/locals.scm b/queries/locals.scm new file mode 100644 index 0000000..944aa98 --- /dev/null +++ b/queries/locals.scm @@ -0,0 +1,6 @@ +; Scope +[ + (block) + (class_block) + (text_block) +] @scope