From 05638653606e3135e734c9ea2bbd6e232b8c7ea3 Mon Sep 17 00:00:00 2001 From: Alexander Gehrke Date: Thu, 11 Apr 2024 20:03:52 +0200 Subject: [PATCH] default to treesitter foldexpr --- init.lua | 4 +++- lua/plugins/conform.lua | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 794c233..17579ac 100644 --- a/init.lua +++ b/init.lua @@ -38,7 +38,9 @@ vim.opt.whichwrap = "b,s,<,>,[,],h,l" vim.opt.timeout = false -vim.opt.foldenable = false +vim.opt.foldmethod = "expr" +vim.opt.foldlevel = 99 +vim.opt.foldexpr = "nvim_treesitter#foldexpr()" vim.opt.diffopt:append("vertical") vim.opt.diffopt:append("linematch:50") diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index e1683db..44487d1 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -30,8 +30,4 @@ return { }, }, }, - init = function() - -- If you want the formatexpr, here is the place to set it - vim.o.formatexpr = "v:lua.require'conform'.formatexpr()" - end, }