All Projects → elixir-sublime → elixir-sublime-syntax

elixir-sublime / elixir-sublime-syntax

Licence: MIT license
The most powerful Elixir for the most Sublime experience.

Programming Languages

elixir
2628 projects
python
139335 projects - #7 most used programming language
Euphoria
14 projects
HTML
75241 projects

Projects that are alternatives of or similar to elixir-sublime-syntax

Naomi
Sublime Text enhanced syntax highlighting for JavaScript ES6/ES7/ES2015/ES2016/ES2017+, Babel, FlowType, React JSX, Styled Components, HTML5, SCSS3, PHP 7, phpDoc, PHPUnit, MQL4. Basic: Git config files.
Stars: ✭ 544 (+1842.86%)
Mutual labels:  syntax, sublime
Sublime Markdown Extended
Top 100 Sublime Text plugin! Markdown syntax highlighter for Sublime Text, with extended support for GFM fenced code blocks, with language-specific syntax highlighting. YAML Front Matter. Works with ST2/ST3. Goes great with Assemble.
Stars: ✭ 645 (+2203.57%)
Mutual labels:  syntax, sublime
Nord Sublime Text
An arctic, north-bluish clean and elegant Sublime Text theme.
Stars: ✭ 109 (+289.29%)
Mutual labels:  syntax, sublime
sublime-zig-language
Zig language support for Sublime Text
Stars: ✭ 62 (+121.43%)
Mutual labels:  sublime
explain-rs
A library which finds language features in rust code and provides resources on them.
Stars: ✭ 38 (+35.71%)
Mutual labels:  syntax
sublime-jasmine
Jasmine syntax, snippets and commands
Stars: ✭ 24 (-14.29%)
Mutual labels:  sublime
language-rainmeter
Syntax highlighting for Rainmeter files in Atom.
Stars: ✭ 19 (-32.14%)
Mutual labels:  syntax
laravel-or-abort
A trait to optionally abort a Laravel application
Stars: ✭ 54 (+92.86%)
Mutual labels:  syntax
ProColors
A collection of coding themes for syntax highlighting and the editors that are designed to be available in dark and light modes with a very high precision of harmony and token definition coverage.
Stars: ✭ 94 (+235.71%)
Mutual labels:  sublime
cheatsheet-python-A4
📖 Advanced Python Syntax In A4
Stars: ✭ 96 (+242.86%)
Mutual labels:  syntax
nord-notepadplusplus
An arctic, north-bluish clean and elegant Notepad++ theme.
Stars: ✭ 112 (+300%)
Mutual labels:  syntax
colocat
Fegeya Colocat, Colorized 'cat' implementation. Written in C++17.
Stars: ✭ 14 (-50%)
Mutual labels:  syntax
chestnut.vim
Minimal syntax highlighting for 16-color terminals.
Stars: ✭ 31 (+10.71%)
Mutual labels:  syntax
csscomplete.vim
Update the bult-in CSS complete function to latest CSS standard.
Stars: ✭ 61 (+117.86%)
Mutual labels:  syntax
language-rust
Parser and pretty-printer for the Rust language
Stars: ✭ 78 (+178.57%)
Mutual labels:  syntax
Sublime-GameMaker-Studio-Language-Bundle
A sublime bundle for GameMaker Language (GML)
Stars: ✭ 32 (+14.29%)
Mutual labels:  sublime
nord-atom-syntax
An arctic, north-bluish clean and elegant Atom syntax theme.
Stars: ✭ 72 (+157.14%)
Mutual labels:  syntax
dotfiles
Setup git, vim, zsh, SublimeText, tmux etc. using one command
Stars: ✭ 107 (+282.14%)
Mutual labels:  sublime
dotfiles
My dotfiles (vim/conky/etc.)
Stars: ✭ 79 (+182.14%)
Mutual labels:  sublime
syntax highlighter
Syntax Highlighter for Dart/Flutter Code
Stars: ✭ 28 (+0%)
Mutual labels:  syntax

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.
  • Palette commands: ElixirSyntax: ..., Mix Test: ..., Mix Format: ...
  • Build commands: mix format, mix test, elixir $file
  • Snippets for IO.inspect, tap and then.

Some syntax 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)

Testing

Build-files as well as commands are provided for calling mix test. The predefined shortcuts can be changed via Preferences > Package Settings > ElixirSyntax > Key Bindings.

Tip: To run specific tests in the current file, mark them with multiple cursors and/or spanning selections and press Alt+Shift+T or choose Mix Test: Selection(s) from the palette.

ElixirSyntax stores a per-project JSON settings file in the root folder that contains both the mix.exs file and the _build/ folder. They override the general settings below.

General settings example (via Preferences > Package Settings > ElixirSyntax > Settings):

{
  "mix_test": {
    "output": "tab",
    "output_mode": null,
    "output_scroll_time": 2,
    "args": ["--coverage"],
    "seed": null
  }
}

When a mix test command is run the first time, a mix_test.repeat.json file is stored in the _build/ folder to remember the command arguments. By pressing Alt+Shift+R or running Mix Test: Repeat from the palette you can repeat the previously executed tests.

Formatting

Use the default shortcut Alt+Shift+F or the palette command Mix Format: File to format your Elixir code. Format the whole project via Mix Format: Project / Folder. Configure auto-formatting on save via the palette command Mix Format: Toggle Auto-Formatting or via the menu Preferences > Package Settings > ElixirSyntax > Settings. There is no per-project auto-format setting yet.

{
  "mix_format": {
    "on_save": true
  }
}

Palette commands

  • ElixirSyntax: Settings
  • ElixirSyntax: Open Hex Docs
  • ElixirSyntax: Search Hex Packages
  • Mix Test: Settings
  • Mix Test: All
  • Mix Test: File
  • Mix Test: Selection(s)
  • Mix Test: Failed
  • Mix Test: Repeat
  • Mix Test: Set --seed
  • Mix Test: Toggle --stale Flag
  • Mix Test: Switch to Code or Test
  • Mix Test: Show Panel
  • Mix Format: File
  • Mix Format: Project / Folder
  • Mix Format: Toggle Auto-Formatting

Recommended packages

  • LSP and LSP-elixir for intelligent code completion and additional snippet suggestions.

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].