mirror of
https://github.com/tomru/nvim.git
synced 2026-03-03 06:27:14 +01:00
update folding settings
This commit is contained in:
@@ -36,3 +36,11 @@ vim.opt.scrolloff = 10
|
||||
vim.o.laststatus = 3
|
||||
|
||||
vim.opt.confirm = true
|
||||
|
||||
-- Treesitter-based folding
|
||||
vim.opt.foldmethod = 'expr'
|
||||
vim.opt.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||
vim.opt.foldlevel = 99 -- Start with all folds open
|
||||
vim.opt.foldlevelstart = 99
|
||||
vim.opt.foldenable = true
|
||||
vim.opt.foldcolumn = '1' -- Show fold column
|
||||
|
||||
@@ -6,15 +6,4 @@ return {
|
||||
---@module 'render-markdown'
|
||||
---@type render.md.UserConfig
|
||||
opts = {},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = vim.api.nvim_create_augroup('markdown.fold', {}),
|
||||
pattern = 'markdown',
|
||||
callback = function()
|
||||
-- sets local folding options for markdown
|
||||
vim.opt_local.foldmethod = 'expr'
|
||||
vim.opt_local.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user