Closed vincekd closed 7 years ago
Nevermind about the font-lock-function-name-face
, that was just a product of java-mode
being confused by groovy syntax.
But everything works fine if you load a c-derived mode before groovy-mode
.
Fixed by adding (require 'cc-fonts)
but I'm not sure that's the best solution, considering this is the only font from that group that's used.
Looks like cc-fonts just defines it as the font-lock-constant-face
https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cc-fonts.el#L196-L202
Aha, great debugging!
Agreed we should just use font-lock-constant-face (or define a groovy-annotation-face
that inherits from it).
Playing with this, I've also noticed that we highlight @interface
as @
followed by the keyword interface
, rather than an annotation. That's a bug.
Playing with this, I've also noticed that we highlight @interface as @ followed by the keyword interface, rather than an annotation. That's a bug.
I think that's an invalid name for an annotation anyway, flycheck throws an error for it. Also, groovy console behaves the same way (and throws a compilation error).
Declaring annotations uses @interface
: http://groovy-lang.org/objectorientation.html#_annotation unless I'm missing something?
oh, oops. I was being an idiot and thought you meant creating an annotation named "interface", instead of talking about the actual interface annotation.
I get this error
Error during redisplay: (jit-lock-function 1001) signaled (void-variable c-annotation-face)
when I have annotations on the page, which screws up keyword highlighting for the rest of the file.Looking at
java-mode
it seems they just set annotations to thefont-lock-function-name-face
.