d2-mode icon indicating copy to clipboard operation
d2-mode copied to clipboard

d2lang syntax highlighting

Open avelino opened this issue 2 years ago • 3 comments

we need to give syntax highlighting support to the d2 language, the other editor versions that are on the official language site have color support (editor support)

when forcing d2-mode loading on open d2-file Screenshot 2023-01-03 at 20 00 39

avelino avatar Jan 03 '23 21:01 avelino

thanks @avelino! I'll try to get to that this week!

andorsk avatar Jan 05 '23 09:01 andorsk

@avelino thanks for the comments. Finally getting to it this weekend.

Seems like there are two issues bundled in this. re: syntax highlighting, I believe we already support this?

https://github.com/andorsk/d2-mode/blob/main/d2-mode.el#L92

image

Is the issue that there's inconsistency between syntax highlighting across d2 editors? I can see about lining it up more with the vim package https://github.com/terrastruct/d2-vim/blob/master/syntax/d2.vim if that's the right direction to go.

andorsk avatar Jan 07 '23 08:01 andorsk

re: opening the d2-mode opening a d2 file, I haven't been able to recreate the issue. Can anyone else recreate it?

image

It's possible you're running an old version of d2-mode? Melpa stable might be old. We might need to upgrade the tag to make sure people get the latest version.

Once I get #30 done, I'll probably upgrade the patch tag.

andorsk avatar Jan 07 '23 08:01 andorsk