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

Add indent and fold files to mermaid #6100

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions queries/mermaid/folds.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
(diagram_sequence)
(diagram_class)
(diagram_state)
(diagram_gantt)
(diagram_pie)
(diagram_er)
(diagram_flow)
(flow_stmt_subgraph)
] @fold
18 changes: 18 additions & 0 deletions queries/mermaid/indents.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
([
(diagram_sequence)
(diagram_class)
(diagram_state)
(diagram_gantt)
Copy link
Member

@lucario387 lucario387 Feb 28, 2024

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

(diagram_pie)
(diagram_er)
(diagram_flow)
(flow_stmt_subgraph)
] @indent.begin
(#set! indent.immediate 1))

"end" @indent.branch

[
(ERROR)
(comment)
] @indent.auto
Loading