-
-
Notifications
You must be signed in to change notification settings - Fork 843
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 indent and fold files to mermaid #6100
base: master
Are you sure you want to change the base?
Conversation
The mermaid queries are currently orphaned. Would you like to volunteer as maintainer? |
queries/mermaid/indents.scm
Outdated
|
||
[ | ||
"end" | ||
] @indent.branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@indent.end
seems to be missing here.
Also you need to run ./scripts/format-queries.lua queries/mermaid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@indent.end
seems to be missing here.
I'm not sure what you mean here. Is @indent.end
a required part of an indent query in neovim (I didn't see that in the docs)? By making it branch it does the following
flowchart BT
subgraph DA
direction BT
a --> b
end
flowchart BT
subgraph DA
direction BT
a --> b
end
In terms of the "end" of the first indent. There appears to be no "end" in mermaid js, since I think its one chart per file. And the TS Query Tree is rooted at document. I can't find anything contrary to this with some cursory looking. (I mostly use it in markdown -- one chart per code block)
Also you need to run
./scripts/format-queries.lua queries/mermaid
I was waiting to do this until I knew that I had a general direction to get the pr going.
What would that entail? I would potentially be interested. |
Expected to be pinged and to have some responsiblity in fixing things when some mermaid changes happen that breaks the current queries. |
Also, this PR is only for |
And ideally be proactive: monitor the mermaid parser and make PRs to adapt or extend the queries here before our CI fails. (Especially the latter -- if there are new nodes or such which queries need to be rewritten to make use of; our CI catches breaking changes but not possible improvements.) As to "how": just add yourself as a maintainer in |
That is a good point. I was thinking that there are other graphs. I can add them to the list. I converted this PR to a draft till I make those changes |
Added other graph types And fixed all linting/formatting issues. I'm going to pass, for now, on the maintainer position for mermaid. |
(diagram_sequence) | ||
(diagram_class) | ||
(diagram_state) | ||
(diagram_gantt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this indent the section
part in a gantt chart
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1, 20d
section Another
Task in Another :2014-01-12, 12d
another task :24d
I added basic indentation and folding to mermaid files. The language only had highlights previously. (I think there is room for markdown injections by node names, but I wasn't planning to add that here)
First time contributing here, I read the Contributing.md file and still need to run the formatting scripts. Please let me know if there is anything else I need to change.
Thank you for this amazing plugin. 🙂