1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- --type conform.options
- local options = {
- ft_ignore = { "neorg", "markdown", "json" },
- sections = {
- left = {
- --function() return string.rep('+', vim.v.foldlevel) end,
- function()
- return "level: " .. tonumber(vim.v.foldlevel)
- end,
- ", ",
- "number_of_folded_lines",
- ": ",
- "percentage",
- " ",
- "content",
- },
- right = {
- --' ', 'number_of_folded_lines', ': ', 'percentage', ' ',
- --function(config) return config.fill_char:rep(3) end
- --function(global_pretty_config) return global_pretty_config.fill_char:rep(5) end
- },
- },
- --fill_char = '•',
- -- more chars: '┣', '┫'
- fill_char = "━",
- remove_fold_markers = true,
- -- keep the indentation of the content of the fold string.
- keep_indentation = true,
- -- possible values:
- -- "delete" : delete all comment signs from the fold string.
- -- "spaces" : replace all comment signs with equal number of spaces.
- -- false : do nothing with comment signs.
- process_comment_signs = "spaces",
- --process_comment_signs = false,
- -- comment signs additional to the value of `&commentstring` option.
- --comment_signs = {},
- comment_signs = {
- '"""', -- python docstring
- "#", -- python and bash comments
- "--", -- lua comment
- "//", -- c languages comment
- },
- -- list of patterns that will be removed from content foldtext section.
- stop_words = {
- "@brief%s*", -- (for c++) remove '@brief' and all spaces after.
- },
- add_close_pattern = true, -- true, 'last_line' or false
- -- this patterns will not shown in folded line desc
- matchup_patterns = {
- { "{", "}" },
- { "%(", ")" }, -- % to escape lua pattern char
- { "%[", "]" }, -- % to escape lua pattern char
- },
- }
- require("pretty-fold").setup(options)
|