Setup treesitter folds in treesitter plugin init
This commit is contained in:
parent
bd00a689b8
commit
e18458d089
|
@ -65,8 +65,6 @@ vim.o.listchars = "trail:~,tab:¦⁃,nbsp:␣"
|
||||||
vim.o.list = true
|
vim.o.list = true
|
||||||
|
|
||||||
-- Fold settings
|
-- Fold settings
|
||||||
vim.wo.foldmethod = "expr"
|
|
||||||
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
|
||||||
vim.o.foldlevelstart = 99
|
vim.o.foldlevelstart = 99
|
||||||
|
|
||||||
-- Windows borders
|
-- Windows borders
|
||||||
|
|
|
@ -12,6 +12,10 @@ return {
|
||||||
branch = "master",
|
branch = "master",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
main = "nvim-treesitter.configs",
|
main = "nvim-treesitter.configs",
|
||||||
|
init = function()
|
||||||
|
vim.wo.foldmethod = "expr"
|
||||||
|
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||||
|
end,
|
||||||
--- @module "nvim-treesitter"
|
--- @module "nvim-treesitter"
|
||||||
--- @type TSConfig
|
--- @type TSConfig
|
||||||
opts = {
|
opts = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user