ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Elixir​Syntax

The most powerful Elixir for the most Sublime experience.

Details

Installs

  • Total 5K
  • Win 870
  • Mac 2K
  • Linux 1K
Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20
Windows 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1 0 0 0 1 0 1 1
Mac 7 3 0 0 1 1 0 3 0 2 4 2 2 1 4 2 1 3 0 1 3 0 4 4 3 2 2 0 2 2 2 1 1 1 1 5 1 1 0 2 2 1 2 1 3 1
Linux 0 1 1 1 0 0 0 0 0 0 1 2 1 1 1 2 1 2 1 0 0 0 0 2 0 5 0 0 1 3 0 0 0 0 0 1 1 1 0 1 1 1 1 1 1 0

Readme

Source
raw.​githubusercontent.​com

ElixirSyntax

ElixirSyntax was initially based on the Elixir.tmbundle package but has been rewritten since, providing more accurate syntax matching as well as better syntax highlighting.

Features

  • Working Goto Definition command.
  • HTML template highlighting:
    • HEEx:
    • Surface:
    • LiveView:
  • Full PCRE syntax highlighting:
  • Type highlighting:
  • Theme adaptations for Mariana and Monokai.
  • Build commands: mix format, mix test, elixir $file
  • Snippets for IO.inspect, tap and then.

Some highlighting features are not immediately evident. Among them are:

The fragment and sql functions

SQL syntax is highlighted inside Ecto's fragment macro.

Add an sql macro/function to your project to enjoy SQL highlighting anywhere it's used.

The JSON ~j and ~J sigils (Jason)

Embed JSON strings in your Elixir code. Notice the interpolated Elixir code is colored correctly.

The YAML ~y and ~Y sigils (YamlElixir)

Recommended packages

Changes

See CHANGELOG.md for the list of releases and noteworthy changes.

FAQ

  • How to color unused variables, e.g. _opts, differently?

You can customize the color of unused variable names by extending your color scheme, targeting the variable.parameter.unused and variable.other.unused scopes:

{
    "rules": [
      {
        "name": "Unused variables",
        "scope": "variable.parameter.unused, variable.other.unused",
        "foreground": "#8c8cff"
      }
    ]
  }

More details at Sublime Text Docs

Contributors/Maintainers

  • @azizk rewrote the whole syntax definition with an extensive test-suite and added a wealth of new features. ⭐
  • @princemaple initially brought the tm-syntax to sublime-syntax and made some improvements.