-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add Markdown and Org mode headers to grammar #6
Comments
just pushed to master some initial support for headers, let me know if there is any issues |
awesome I'll take a look tomorrow. Super excited for this. |
Just getting around to testing this because I forgot you implemented it :) |
I believe so, we need to change the folds.scm file to add it the headers node name link |
Okay I can help out with this. I'll test locally and create a PR with nvim-treesitter |
tag this issue or me on the PR and I can give my approval since I am the maintainer on that repo |
Change has been merged into nvim-treesitter. There must still be more to do. I am still getting |
I will take a look when I get a chance |
Hi folks, I'm sure you're busy and this project and beancount-lsp are amazing. Just wanted to pop in to add that this feature is the one I miss most in switching from vim-beancount to LSP, and was hoping this was still on your radar. Folds by financial year (in my case) are so useful in big ledgers. |
I think the issue is that headings are defined up until a newline and don’t contain the content beneath them. So if folding was working right now you would only be folding a single line. @polarmutex to support this properly we would need to change the grammar to make headings a parent node of the tree. At least from little I understand about treesitter. |
will look into this when I find the time |
closes when nvim-treesitter/nvim-treesitter/pull/3078 is merged |
I should point out that currently only org mode is supported. The logic might get dicey to support org and markdown. Want more time to play with it and add tests to make sure nothing funny happenes Sorry for the delay in getting this out. I have a lot of beancount tools I want and so little time to make them. |
Org sytle headers is just fine for me. |
Forgot to drop in before and say that this is working great for me. I think this can be closed. |
I think it would be great if both markdown and org mode style headers where added to this grammar. Quite a bit of people in the ledger communities use headers to organize their ledgers.
I for one would love to be able to fold my ledger files by the headings as I usually organize my files like this
Using nvim-treesitter and this parser I found I could fold transaction entries but not from the header they were nested under.
The text was updated successfully, but these errors were encountered: