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

Support for arbitary depth heading #53

Closed
wrvsrx opened this issue Jul 18, 2024 · 3 comments
Closed

Support for arbitary depth heading #53

wrvsrx opened this issue Jul 18, 2024 · 3 comments

Comments

@wrvsrx
Copy link
Contributor

wrvsrx commented Jul 18, 2024

Currently heading deeper than 6 is not supoprted

######### j
@treeman
Copy link
Owner

treeman commented Jul 18, 2024

Hmm. Do you have a specific use-case for depth 7+? The markdown treesitter also only supports 6 deep.

It's possible to support arbitrary nesting, the problem is that we create tokens like heading1, heading2 etc and as far as I know they can't be created dynamically with treesitter. So either we abandon them and only use heading, relying on Neovim's #eq? predicate for queries (I hope there are similar ones for other editors), or we add a heading_deep that captures headings of 7+.

I don't know what approach I think is the best.

@wrvsrx
Copy link
Contributor Author

wrvsrx commented Jul 21, 2024

I mention that just because djot support that in specification.

For tree-sitter highlighting, I think heading is enough?

@treeman
Copy link
Owner

treeman commented Jul 21, 2024

You're right, this is something we should support. I'm leaning towards heading being the best approach...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants