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

Indentation Not Working #45

Closed
joyguar opened this issue Mar 12, 2023 · 4 comments · Fixed by #47
Closed

Indentation Not Working #45

joyguar opened this issue Mar 12, 2023 · 4 comments · Fixed by #47
Labels
enhancement New feature or request

Comments

@joyguar
Copy link

joyguar commented Mar 12, 2023

Hello,

I've just installed and tried making use of d2-mode but indentation isn't working. If I type out the example

My Class {
   shape: class
   +field: string
   read ()
}

indentation behaves the same as in fundamental mode. I have to manually tab the shape: class line, and then I have to manually de-indent the curly brace. I've installed both from melpa and tried a git clone, but I get the same behavior.

Are there limits on the indentation?

@andorsk
Copy link
Owner

andorsk commented Mar 12, 2023

Thanks for raising this @dstrr. I don't think there's any specific indentation policies set yet, so I think you're right, this can be a feature request that can be added in.

@andorsk andorsk added the enhancement New feature or request label Mar 12, 2023
@MoisMoshev
Copy link
Contributor

I'm willing to take on that, if I get any idea of how indentation works. Is there a simple mode that does it, which I can look at for inspiration?
I'm reasonably comfortable in emacs lisp.

@andorsk
Copy link
Owner

andorsk commented Jun 5, 2024

Hey Mois. Sorry for the delay in a response here. https://github.com/abrochard/mermaid-mode/blob/master/mermaid-mode.el#L133 is a good starting point and I would certainly welcome the contribution!

Thank you and I look forward to the PR!

@MoisMoshev
Copy link
Contributor

Ooh that's nice. Moving point and then searching backwards, I hadn't thought of that.
Let me see when I'll fit it in the schedule.

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

Successfully merging a pull request may close this issue.

3 participants