queries: add folds

Closes #6
This commit is contained in:
Dmitriy Pleshevskiy 2023-06-16 18:37:15 +03:00
parent 3db7cfa22d
commit 435eddcf32
Signed by: pleshevskiy
GPG key ID: 79C4487B44403985
3 changed files with 21 additions and 0 deletions

View file

@ -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]])

5
queries/folds.scm Normal file
View file

@ -0,0 +1,5 @@
[
(block)
(class_block)
(text_block)
] @fold

6
queries/locals.scm Normal file
View file

@ -0,0 +1,6 @@
; Scope
[
(block)
(class_block)
(text_block)
] @scope