CodyReichert / shakespeare-mode

An emacs major mode for editing hamlet, lucius, and julius files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support for cassius

wolftune opened this issue · comments

I'm not an emacs user but was looking to advise others regarding Shakespearean templates. Is there no support for .cassius files? They are identical to .lucious but use whitespace and eliminate braces and semicolons and such. They are pretty simple, but syntax highlighting is still nice etc. Could support be added for those easily?

Hey @wolftune. Correct, Cassius files are not currently supported. Mostly because I use Lucius almost exclusively, but that's just personal preference. I'm definitely open to adding Cassius - it's been on my todo list for a while. Syntax highlighting and indentation are the two pieces - and yes they should be pretty easy to add.

For indentation, inspiration can be taken from sass-mode, or possibly yaml-mode. And syntax highlighting can use the same as Lucius, which is already there.

I can probably add this within the next week or so if I get a few free hours, but I'll leave this open in case anyone else comes along and wants to help out before then.

Thanks, that would be really nice to have. I'm a vim user myself, but others who work on the same project use Emacs. We use only Cassius and not Lucius. I'm surprised some people prefer Lucius. To me, it seems only useful at all because it is easier to copy/paste plain CSS. But anyway, yeah, thanks for considering adding Cassius support!

So, I looked into this more… Cassius is Lucius just leaving out unnecessary extra braces and semicolons, so I figured out (in another Text Editor) that literally the exact unchanged syntax stuff for Lucius shoud work for Cassius.

The only thing needed is simply to either make all the existing Lucius stuff be specified to get used for both Lucius and Cassius files or copy all the Lucius code unchanged except for changing "Lucius" to "Cassius" (and ".lucius" to ".cassius").

As a non-Emacs user myself, I haven't played with all this, but this should be that simple. I want Emacs users to have Cassius support when working on our project… so I hope this can be done soon. I could submit a PR of it myself, except I don't have Emacs set up to test it, which I could do but that would be extra hassle.

I am also interested in cassius support. Is this still a work in progress?

Hey @concavegit - thanks! I don't have any active work going on for adding Cassius support, but would definitely be happy to merge a PR or provide any guidance on someone adding it.

I may have some time over the holidays, but not anything I can guarantee :)


FWIW, indentation support would be the hardest part. I think inheriting from sass-mode or yaml-mode would be the easiest way to start. But those aren't built-in Emacs modes, and I'm not sure how to add them as a dependency or something.

Then again, maybe it's much easier than that. I haven't looked in a while.