Skip to content

sebthom/extra-syntax-highlighting-eclipse-plugin

"Extra Syntax Highlighting" plugin for Eclipse

Build Status Contributor Covenant License Eclipse Marketplace

Feedback and high-quality pull requests are highly welcome!

  1. What is it?
  2. Installation
  3. Supported File Formats/Languages
  4. Building from Sources
  5. License

What is it?

This EclipseⓇ plug-in adds syntax highlighting support for the following languages/file formats utilizing TM4E:

  1. Amber - https://amber-lang.com/
  2. ANTRL4 - https://www.antlr.org/
  3. Apache HTTP configuration files - https://httpd.apache.org/docs/current/configuring.html
  4. Astro - https://astro.build/
  5. Ballerina - https://ballerina.io/
  6. Bazel - https://bazel.build/
  7. BF - https://en.wikipedia.org/wiki/Brainfuck
  8. Carbon - https://carbon-lang.dev
  9. COBOL - https://en.wikipedia.org/wiki/COBOL
  10. CodeQL - https://codeql.github.com/
  11. Crystal (*.cr) - https://crystal-lang.org/
  12. CSV (*.cvs) / TSV (*.tab*, *.tsv*)
  13. D2 - https://d2lang.com/
  14. Eclipse External null Annotations (*.eea) - https://github.com/eclipse-jdt/eclipse.jdt.core/wiki/Null-Analysis-External-Annotations#file-format
  15. EditorConfig - https://editorconfig.org
  16. Elm - https://elm-lang.org/
  17. Entity-Relationship Diagram (*.er) - https://github.com/BurntSushi/erd
  18. Erlang (*.erl) - https://www.erlang.org/
  19. Fish (*.fish) - https://fishshell.com/docs/current/language.html
  20. Fluent (*.flt) - https://projectfluent.org/
  21. Fortran - https://fortran-lang.org/
  22. gitattributes - https://git-scm.com/docs/gitattributes
  23. Gleam (*.gleam) - https://gleam.run/
  24. GLSL (OpenGL Shading Language) - https://registry.khronos.org/OpenGL/index_gl.php#apispecs
  25. GraphQL - https://graphql.org/
  26. Graphviz Dot (*.dot) - https://graphviz.org/doc/info/lang.html
  27. HashiCorp HCL (*.hcl) - https://github.com/hashicorp/hcl (e.g. used by HasiCorp Packer)
  28. HashiCorp Sentinel (*.sentinel) - https://www.hashicorp.com/sentinel
  29. HashiCorp Terraform (*.tf) - https://www.terraform.io/
  30. Haxe - https://haxe.org
  31. Helm (*.tpl) - https://helm.sh/
  32. Janet - https://janet-lang.org/
  33. Jinja Templates - https://jinja.palletsprojects.com/
  34. JSON5 (*.json5) - https://json5.org/
  35. Jsonnet (*.jsonnet) - https://jsonnet.org/
  36. jte: Java Template Engine (*.jte) - https://jte.gg/
  37. Kotlin - https://kotlinlang.org/
  38. LDIF - https://en.wikipedia.org/wiki/LDAP_Data_Interchange_Format
  39. Mako Templates (*.mako) - https://www.makotemplates.org/
  40. Markdoc (*.markdoc) - https://markdoc.dev/
  41. Markdown (*.md) - https://daringfireball.net/projects/markdown/
  42. MDX (*.mdx) - https://mdxjs.com/
  43. Mermaid (*.mmd, *.mermaid) - https://github.com/mermaid-js/mermaid/
  44. NginX (nginx.conf) - https://www.nginx.com/
  45. Nunjucks (*.njk) - https://mozilla.github.io/nunjucks/
  46. Nushell (*.nu) - https://github.com/nushell/nushell
  47. OCaml (*.ml) - https://ocaml.org/
  48. Odin - https://odin-lang.org/
  49. Pascal (*.pas) - https://en.wikipedia.org/wiki/Pascal_(programming_language)
  50. PlantUML (*.pu) - https://plantuml.com/
  51. Pony (*.pony) - https://www.ponylang.io/
  52. Prisma - https://www.prisma.io/
  53. Reason (*.re) - https://reasonml.github.io/
  54. Roc (*.roc) - https://www.roc-lang.org/
  55. Svelte - https://svelte.dev/
  56. TOML - https://toml.io/en/
  57. Twig Templates (*.twig) - https://twig.symfony.com/
  58. Wing - https://www.winglang.io/
  59. Zig - https://ziglang.org/

For a lot more formats install the TM4E Language Pack from the TM4E update site https://download.eclipse.org/tm4e/releases/latest/

For the following languages/file formats you can also install specialised Eclipse plug-ins with additional features:

Installation

To install the plugin into an existing Eclipse installation do:

  1. Within Eclipse go to: Help -> Install New Software...
  2. Enter the following update site URL: https://raw.githubusercontent.com/sebthom/extra-syntax-highlighting-eclipse-plugin/updatesite
  3. Select the Extra Syntax Highlighting feature to install.
  4. Ensure that the option Contact all update sites during install to find required software is enabled.
  5. Click Next twice.
  6. Read/accept the license terms and click Finish.
  7. Eclipse will now download the necessary files in the background.
  8. When the download has finished, Eclipse will ask about installing unsigned content. You need to accept if you want to
  9. After installation you will be prompted for a restart of Eclipse, which is recommended.

Minimum version requirements

  • JDK: 17 or newer
  • Eclipse IDE: 2022-06 (4.25) or newer
  • TM4E: 0.6.2 or newer

Supported File Formats/Languages

Language/Format File Associations Source
Amber Image file-extensions="ab, amber" main@amber-lang/amber-vsc
ANTLR Image file-extensions="g, g4" master@mike-lischke/vscode-antlr4
Apache HTTP Config Image file-extensions="conf, htaccess, htgroups, htpasswd" master@mrmlnc/vscode-apache
Astro Image file-extensions="astro" main@withastro/language-tools
Ballerina file-extensions="bal" master@ballerina-platform/ballerina-grammar
bazelrc Image file-extensions="bazelrc"
file-names=".bazelrc, bazel.rc"
master@bazelbuild/vscode-bazel
Branflakes Image file-extensions="bf, bfsck, brainfuck" main@chrisvrose/bf-server
Carbon file-extensions="carbon" trunk@carbon-language/carbon-lang
COBOL Image file-extensions="cbl, cob, cobol, copy, cpy"
file-patterns="**/broadcommfd.cobol-language-support/*/copybooks/**"
development@eclipse-che4z/che-che4z-lsp-for-cobol
CodeQL Image file-extensions="ql, qll" main@github/vscode-codeql
Crystal Image file-extensions="cr" master@crystal-lang-tools/vscode-crystal-lang [upstream]
Crystal Slang Image file-extensions="slang" master@crystal-lang-tools/vscode-crystal-lang
CSV Image file-extensions="csv" master@mechatroner/vscode_rainbow_csv
d2 Image file-extensions="d2" master@terrastruct/d2-vscode
EditorConfig Image file-extensions="editorconfig" main@editorconfig/editorconfig-vscode
Elm Image file-extensions="elm" main@elm-tooling/elm-language-client-vscode
Embedded Crystal Image file-extensions="ecr" master@crystal-lang-tools/vscode-crystal-lang
Entity Relationship Image file-extensions="er" master@mikkel-ol/vsc-er-syntax-highlighting
Erlang Image file-extensions="config, erl, escript, hrl, src" main@erlang-ls/vscode
Fish Image file-extensions="fish" main@bmalehorn/vscode-fish
fluent Image file-extensions="ftl" master@macabeus/vscode-fluent
Fortran Image file-extensions="F03, F08, F18, F90, F95, FPP, FYPP, PF, f03, f08, f18, f90, f95, fpp, fypp, pf" main@fortran-lang/vscode-fortran-support
Fortran77 Image file-extensions="F, F77, FOR, f, f77, for" main@fortran-lang/vscode-fortran-support
Gleam Image file-extensions="gleam" main@gleam-lang/vscode-gleam
GraphQL Image file-extensions="gql, graphql, graphqls" main@graphql/graphiql
GraphViz DOT File file-extensions="dot" master@textmate/graphviz.tmbundle
HashiCorp Sentinel file-extensions="sentinel" main@hashicorp/syntax
HashiCorp Terraform file-extensions="tf, tfvars" main@hashicorp/syntax
Haxe file-extensions="hx" master@vshaxe/haxe-TmLanguage
HCL Config File file-extensions="hcl" main@hashicorp/syntax
helm-template Image file-patterns="**/templates/**/*.tpl, **/templates/**/*.yaml, **/templates/**/*.yml, **/templates/*.tpl, **/templates/*.yaml, **/templates/*.yml" main@vscode-kubernetes-tools/vscode-kubernetes-tools
Janet Image file-extensions="janet" master@janet-lang/vscode-janet
Jinja C++ Image file-extensions="c.j2, c.jinja, c.jinja2, cpp.j2, cpp.jinja, cpp.jinja2, h.j2, h.jinja, h.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Cisco Config Image file-extensions="cisco.j2, cisco.jinja, cisco.jinja2, ios.j2, ios.jinja, ios.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja CSS Image file-extensions="css.j2, css.jinja, css.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Cython Image file-extensions="pxd.j2, pxd.jinja, pxd.jinja2, pxi.j2, pxi.jinja, pxi.jinja2, pyx.j2, pyx.jinja, pyx.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Dockerfile Image file-extensions="dockerfile.j2, dockerfile.jinja, dockerfile.jinja2"
file-names="Dockerfile.j2, Dockerfile.jinja, Dockerfile.jinja2"
main@samuelcolvin/jinjahtml-vscode
Jinja Groovy Image file-extensions="groovy.j2, groovy.jinja, groovy.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja HTML Image file-extensions="htm.j2, htm.jinja, htm.jinja2"
file-patterns="*html.j2, *html.jinja, *html.jinja2"
main@samuelcolvin/jinjahtml-vscode
Jinja Java Image file-extensions="java.j2, java.jinja, java.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja JavaScript Image file-extensions="js.j2, js.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja JSON Image file-extensions="code-workspace.j2, code-workspace.jinja, code-workspace.jinja2, json.j2, json.jinja, json.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja LaTeX Image file-extensions="latex.j2, latex.jinja2, tex.j2, tex.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Lua Image file-extensions="lua.j2, lua.jinja, lua.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Markdown Image file-extensions="md.j2, md.jinja, md.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Nginx Image file-extensions="conf.j2, conf.jinja, conf.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja PHP Image file-extensions="php.j2, php.jinja, php.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Properties/ini/Conf Image file-extensions="cfg.j2, conf.j2, desktop.j2, directory.j2, ini.j2, properties.j2" main@samuelcolvin/jinjahtml-vscode
Jinja Python Image file-extensions="py.j2, py.jinja, py.jinja2, pyi.j2, pyi.jinja, pyi.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Ruby Image file-extensions="rb.j2, rb.jinja2, rbw.j2, rbw.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Rust Image file-extensions="rs.j2, rs.jinja, rs.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Shell Script Image file-extensions="bash.j2, bash_aliases.j2, bash_login.j2, bash_logout.j2, bash_profile.j2, bashrc.j2, ebuild.j2, env.j2, env.jinja, env.jinja2, install.j2, ksh.j2, profile.j2, sh.j2, zlogin.j2, zlogout.j2, zprofile.j2, zsh-theme.j2, zsh.j2, zshenv.j2, zshrc.j2" main@samuelcolvin/jinjahtml-vscode
Jinja SQL Image file-extensions="sql.j2, sql.jinja, sql.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Systemd Unit File Image file-extensions="automount.j2, automount.jinja, automount.jinja2, device.j2, device.jinja, device.jinja2, link.j2, link.jinja, link.jinja2, mount.j2, mount.jinja, mount.jinja2, netdev.j2, netdev.jinja, netdev.jinja2, network.j2, network.jinja, network.jinja2, path.j2, path.jinja, path.jinja2, scope.j2, scope.jinja, scope.jinja2, service.j2, service.jinja, service.jinja2, slice.j2, slice.jinja, slice.jinja2, snapshot.j2, snapshot.jinja, snapshot.jinja2, socket.j2, socket.jinja, socket.jinja2, swap.j2, swap.jinja, swap.jinja2, target.j2, target.jinja, target.jinja2, timer.j2, timer.jinja, timer.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja Terraform Image file-extensions="hcl.j2, hcl.jinja, hcl.jinja2, tf.j2, tf.jinja, tf.jinja2, tfvars.j2, tfvars.jinja, tfvars.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja TOML Image file-extensions="toml.j2, toml.jinja, toml.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja TypeScript Image file-extensions="ts.j2, ts.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja XML Image file-extensions="xml.j2, xml.jinja, xml.jinja2" main@samuelcolvin/jinjahtml-vscode
Jinja YAML Image file-extensions="sls, yaml.j2, yaml.jinja, yaml.jinja2, yml.j2, yml.jinja, yml.jinja2" main@samuelcolvin/jinjahtml-vscode
JSON5 file-extensions="json5" master@katjanakosic/vscode-json5
Jsonnet Image file-extensions="jsonnet, libsonnet" main@grafana/vscode-jsonnet
JTE Templates Image file-extensions="jte, kte" main@maj2c/jte-template-syntax-highlight
Kotlin Image file-extensions="kt, kts" main@fwcd/vscode-kotlin
LDIF File file-extensions="ldif" master@FlashSystems/LDIF-Syntax
Mako Template file-extensions="mako" master@marconi/mako-tmbundle
Markdoc Image file-extensions="markdoc, markdoc.md, mdoc" main@markdoc/language-server
Markdown file-extensions="livemd, markdown, md, mdown, mdwn, mkd, mkdn, mkdown, ronn, scd, workbook" main@wooorm/markdown-tm-language
MDX Image file-extensions="mdx" main@mdx-js/mdx-analyzer
mermaid Image file-extensions="mermaid, mmd" master@bpruitt-goddard/vscode-mermaid-syntax-highlight
NDVR-COBOL Image file-extensions="cbl.prnt, cob.prnt, cobol.prnt, copy.prnt, cpy.prnt" development@eclipse-che4z/che-che4z-lsp-for-cobol
NGINX Conf Image file-extensions="conf, fastcgi_params, nginx, scgi_params, uwsgi_params"
file-patterns="*.conf.default, *.conf.template, *.mime.types, *.nginx.conf"
main@almir/nginx-syntax-highlighter
Nunjucks HTML Image file-extensions="njk, njk.html" main@edheltzel/better-nunjucks-for-visual-studio-code
nushell Image file-extensions="nu" main@nushell/vscode-nushell-lang
OCaml Image file-extensions="eliom, ml, ocamlinit" master@ocamllabs/vscode-ocaml-platform
OCaml Interface Image file-extensions="eliomi, mli" master@ocamllabs/vscode-ocaml-platform
OCaml.mlx Image file-extensions="mlx" master@ocamllabs/vscode-ocaml-platform
OCamlFormat Image file-extensions="ocamlformat" master@ocamllabs/vscode-ocaml-platform
odin Image file-extensions="odin" master@DanielGavin/ols
opam Image file-extensions="opam, opam.locked, opam.template"
file-names="opam"
master@ocamllabs/vscode-ocaml-platform
OpenGL Shading Language Image file-extensions="comp, csh, frag, fs, fsh, fshader, geom, glsl, gs, gsh, gshader, mesh, rahit, rcall, rchit, rgen, rint, rmiss, task, tesc, tese, vert, vs, vsh, vshader" master@GeForceLegend/vscode-glsl
Pascal file-extensions="dfm, dpk, dpr, fmx, lfm, lpr, p, pas" master@textmate/pascal.tmbundle
PlantUML Image file-extensions="iuml, plantuml, pu, puml, wsd" master@qjebbs/vscode-plantuml
Pony file-extensions="pony" main@chalcolith/eohippus
Prisma Image file-extensions="prisma" main@prisma/language-tools
Reason Image file-extensions="re, rei" master@ocamllabs/vscode-ocaml-platform
Ring Image file-extensions="rform, rh, ring" master@ring-lang/ring
Roc Image file-extensions="roc" main@ivan-demchenko/roc-vscode-unofficial
Starlark Image file-extensions="BUILD, WORKSPACE, bazel, bzl, bzlmod, sky, star"
file-names="BUILD, WORKSPACE"
master@bazelbuild/vscode-bazel
Svelte Image file-extensions="svelte" master@sveltejs/language-tools
TOML Config File Image file-extensions="toml"
file-names="Cargo.lock, Pipfile, pdm.lock"
master@juggernautjp/less-toml [upstream]
TSV Image file-extensions="tab, tsv" master@mechatroner/vscode_rainbow_csv
Twig Image file-extensions="peb, twig" main@rholdos/vscode-twig-language-support
Wing Image file-extensions="w, wsim" main@winglang/wing
Zig Image file-extensions="zig, zon" master@ziglang/vscode-zig

Building from Sources

To ensure reproducible builds this Maven project inherits from the vegardit-maven-parent project which declares fixed versions and sensible default settings for all official Maven plug-ins.

The project also uses the maven-toolchains-plugin which decouples the JDK that is used to execute Maven and it's plug-ins from the target JDK that is used for compilation and/or unit testing. This ensures full binary compatibility of the compiled artifacts with the runtime library of the required target JDK.

To build the project follow these steps:

  1. Download and install a Java 17 SDK, e.g. from:

  2. Download and install the latest Maven distribution.

  3. In your user home directory create the file .m2/toolchains.xml with the following content:

    <?xml version="1.0" encoding="UTF8"?>
    <toolchains>
      <toolchain>
        <type>jdk</type>
        <provides>
           <version>17</version>
           <vendor>default</vendor>
        </provides>
        <configuration>
           <jdkHome>[PATH_TO_YOUR_JDK_17]</jdkHome>
        </configuration>
      </toolchain>
    </toolchains>

    Set the [PATH_TO_YOUR_JDK_17] parameter accordingly.

  4. Checkout the code using one of the following methods:

  5. Run mvn clean verify in the project root directory. This will execute compilation, unit-testing, integration-testing and packaging of all artifacts.

License

If not otherwise specified (see below), files in this repository fall under the Eclipse Public License 2.0.

Individual files contain the following tag instead of the full license text:

SPDX-License-Identifier: EPL-2.0

This enables machine processing of license information based on the SPDX License Identifiers that are available here: https://spdx.org/licenses/.

An exception is made for:

  1. files in readable text which contain their own license information, or
  2. files in a directory containing a separate LICENSE.txt file, or
  3. files where an accompanying file exists in the same directory with a .LICENSE.txt suffix added to the base-name of the original file. For example foobar.js is may be accompanied by a foobar.LICENSE.txt license file.