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

Elixir​Syntax

The most powerful Elixir for the most Sublime experience.

Details

  • 2.3.0
    2.0.0
  • github.​com
  • github.​com
  • 5 months ago
  • 2 hours ago
  • 5 years ago

Installs

  • Total 4K
  • Win 820
  • Mac 2K
  • Linux 1K
May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7
Windows 0 1 1 0 0 1 0 0 4 0 0 0 0 1 0 0 1 4 2 2 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 0 2 0 0 1 1 0 0 0 0 0
Mac 0 0 3 1 0 1 1 2 1 1 0 4 2 0 1 2 3 3 1 0 1 0 1 1 3 2 2 2 1 3 1 2 0 1 1 0 4 6 0 1 3 3 2 1 2 1
Linux 4 1 0 0 0 0 0 0 0 0 2 0 0 0 0 1 2 1 0 0 0 6 1 1 1 2 1 0 3 0 4 1 0 0 0 0 0 0 0 0 4 0 0 0 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.