I’ve finally gotten fed up with cperl-mode, because it has now decided to throw lisp errors upon typing things like
}, anything that would make use of its electric feature (which I couldn’t find how to turn off fast enough), so now I decided to take an earnest effort in creating my own perl6 major mode.
Right now this mode highlights
'' strings (because emacs provides string and comment highlighting for you; I have yet to set up comments), as well as sigilled variables with identifier names and also
$/. There’s also an indentation code that works well, but the rules that govern it will certainly need refinement over time as more specialized rules are discovered 🙂 .
If you use emacs, I invite you to try it out. The easiest way to use it is to open it in emacs, type
M-x eval-buffer, and then open a Perl 6 file and type
M-x p6-mode . The only part that will likely be bug-report-worthy* is going to be when the indentation code doesn’t work right. Issues with highlighting are not worthwhile to report until there’s quite a bit of highlighting support 🙂 .
I hope that in the coming weeks/months this will turn into a fully-functional Perl 6 major mode. It will also, after full Standard Perl 6 support is done, be extensible due to the highly malleable nature of Perl 6 parsing. (see the repo’s README for more on this)
Have the appropriate amount of fun!
*Lisp errors that throw you into a debugger and turn all of your modelines from saying
[(Fundamental)] are of course another problem to report. If that happens, follow these steps (or else that
[(Fundamental)] thing, called recursive edit mode, will possibly never go away until you restart emacs):
- Select the entire error (with your mouse or
- Copy it (
- Exit the debugger (
- Paste in another buffer before you lose the error, *scratch* is a good choice (
C-x b *scratch* C-y)
- Report the issue to https://github.com/lue/p6mode/issues, preferably with the error message you just copy-pasted 🙂 .