Is it possible to create an IntelliJ plugin to hig...
# intellij
v
Is it possible to create an IntelliJ plugin to highlight/colourize any the use of class/object which has a particular annotation? E.g. if I have a class
@Comment class Spec(...)
then whenever I refer to
Spec
in my code, it would be highlighted? I'd write code like
get(...).spec(Spec("description here"))
and everything and the
Spec("description here")
part would get a different text style?
My use is my custom API/router library and OpenAPI specification. My routes appear like this in the code:
Copy code
get("", pageController::getPages).spec(Spec.PathItem("Get pages", "Returns a list of all pages"))

 post(
    "/save",
     pageController::saveMarkdownPageSource,
 ).supplies(setOf(MimeType.plainText)).spec(
   Spec.PathItem("Save page", "Save markdown page source"))
Which is working fine, and my code builds an openAPI spec yaml file. But the
Spec
stuff is very noisy and makes the code hard to read. I'd like to be able to tell IntelliJ that
Spec
is a comment, ideally.
a
I like using
@Language("text")
for those sorts of situations https://www.jetbrains.com/help/idea/using-language-injections.html