how to hightlight specific key word or json path in a virtual file with jsonType

Answered

I got an virturl json file with the default hightlighting , how can I add a custom hightlight for this file to hightligth specific key word or use json path .

for example :
{
"name": "sxl",
"age": 18
}

I want highlight the line contains keyword name , what should I do ?

3 comments
Comment actions Permalink

thank you for you help , I wonder know how to assign  variable in an already registered Annotator in plugin.xml (cause I can only get these highlighting keyword at runtime ) ,  or  how to dynamic  register Annotator for  an virtual File.

0
Comment actions Permalink

Sorry, I don't understand that question. Please give some examples. You can also browse existing implementations in IJ Community sources or from 3rd party plugins here https://plugins.jetbrains.com/intellij-platform-explorer?extensions=com.intellij.annotator

0

Please sign in to leave a comment.