Defining your own syntax highlighting in Crucible or Fisheye

Still need help?

The Atlassian Community is here for you.

Ask the community

Create Your Own

All existing syntax highlighting definitions can be found at FISHEYE_INST/syntax directory.
For example java.def:

syntaxdef java {


/\s+/m : ;


/(abstract|b(oolean|reak|yte)|c(a(se|tch)|har|lass|on(st|tinue))\
|d(efault|o(|uble))|e(lse|xtends)|f(alse|inal(|ly)|loat|or)|goto\
|i(f|mp(lements|ort)|n(stanceof|t(|erface)))|long|n(ative|ew|ull)\
|p(ackage|r(ivate|otected)|ublic)|return|s(hort|tatic|uper|witch|ynchronized)\
|t(h(is|row(|s))|r(ansient|ue|y))|vo(id|latile)|while)\b/ : {
      region {
        type=keyword;
        index=word;
      }
}

...
...
...

   context todo {
      /(?i)todo\s.*/ : {
        region {
          type=todo;
        }
      }

   }

}

To create your own:

  1. Copy one of the existing definitions into your FISHEYE_INST/syntax directory. (Note, by making your modifications in the FISHEYE_INST directory, your changes will persist across upgrades. If you make the changes in FISHEYE_HOME, they will need to be reapplied each upgrade).
  2. Then modify the filename and the definition in the FISHEYE_INST/syntax directory. E.g. you can change java.def to objectiveC.def and modify the definition to suit your programming language.
  3. Copy the FISHEYE_HOME/syntax/filename.map to your FISHEYE_INST/syntax directory and modify it to map file extensions to definitions.
  4. Restart Fisheye to pick up the change.

Configure syntax highlighting for non-standard file extensions


Last modified on Mar 31, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.