aerial.nvim icon indicating copy to clipboard operation
aerial.nvim copied to clipboard

feature request: foldmarker support

Open anuramat opened this issue 1 year ago • 1 comments

Did you check existing requests?

  • [X] I have searched the existing issues

Describe the feature

when using fdm=marker and there's no treesitter/lsp/etc, use foldmarkers as a fallback, with the line as the name of the symbol, so that

# section 1 {{{1
# subsection 1.1 {{{2
# ...
# subsection 1.2 {{{2

would become

section 1
├── subsection 1.1
└── subsection 1.2

Provide background

long configs, especially ones where you can't include/import from a separate file

What is the significance of this feature?

nice to have

Additional details

the marker can be removed with

string.gsub(line, string.gsub(vim.o.foldmarker, ',.*', '') .. '%d*', '')

not sure if it's possible to use the builtin comment function tho

anuramat avatar Dec 03 '24 20:12 anuramat

This is a neat idea. Would probably require building a custom backend, like we did for asciidoc

stevearc avatar Dec 05 '24 18:12 stevearc