[HOW TO] highlight identifier under caret in custom language

How can I implement identifier/reference highlighting in a custom language (Colors&Forms > General > Identifier under caret)?

3 comments

Have a look at plugin BrowseWordAtCaret
it doesn't depend on language of opened file

0

Hello Dan,

How can I implement identifier/reference highlighting in a custom
language (Colors&Forms > General > Identifier under caret)?


This is based on a simple references search. For the highlighting to work,
the element being referenced needs to implement either PsiNamedElement or
PsiNameIdentifierOwner.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Thanks Dmitry, works great!
Had some small problems at the beginning with the search scopes, as my files are not in local file system, but it turned out fine. Good stuff...
Dan

0

Please sign in to leave a comment.