Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: foldmarker support #429

Open
1 task done
anuramat opened this issue Dec 3, 2024 · 1 comment
Open
1 task done

feature request: foldmarker support #429

anuramat opened this issue Dec 3, 2024 · 1 comment
Labels
enhancement New feature or request P2 Not a priority. PRs welcome

Comments

@anuramat
Copy link

anuramat commented Dec 3, 2024

Did you check existing requests?

  • 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 anuramat added the enhancement New feature or request label Dec 3, 2024
@stevearc
Copy link
Owner

stevearc commented Dec 5, 2024

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

@stevearc stevearc added the P2 Not a priority. PRs welcome label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 Not a priority. PRs welcome
Projects
None yet
Development

No branches or pull requests

2 participants