# ElixirSyntax ElixirSyntax was initially based on the [Elixir.tmbundle package](https://github.com/elixir-editors/elixir-tmbundle) 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`](https://github.com/michalmuskala/jason/blob/ec2042e4e47442bf3d58410934b8e8f6ff850b3f/lib/sigil.ex)) Embed JSON strings in your Elixir code. Notice the interpolated Elixir code is colored correctly.
### The YAML `~y` and `~Y` sigils ([`YamlElixir`](https://hexdocs.pm/yaml_elixir/YamlElixir.Sigil.html#sigil_y/2))
## Recommended packages * [LSP](https://packagecontrol.io/packages/LSP) and [LSP-elixir](https://packagecontrol.io/packages/LSP-elixir) for intelligent code completion. ## Changes See [CHANGELOG.md](./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](https://user-images.githubusercontent.com/1329716/152258038-384c6a61-d974-4e9a-a1db-ab979c839ff7.png) of unused variable names by extending your color scheme, targeting the `variable.parameter.unused` and `variable.other.unused` scopes: ```json { "rules": [ { "name": "Unused variables", "scope": "variable.parameter.unused, variable.other.unused", "foreground": "#8c8cff" } ] } ``` More details at [Sublime Text Docs](https://www.sublimetext.com/docs/color_schemes.html) ## Contributors/Maintainers - [@azizk](https://github.com/azizk) rewrote the whole syntax definition with an extensive test-suite and added a wealth of new features. ⭐ - [@princemaple](https://github.com/princemaple) initially brought the tm-syntax to sublime-syntax and made some improvements.