+1

Syntax Highlighting: support for Elixir

JvL 4 months ago updated by pgoiffon 1 day ago 3

Add support for the Elixir language.

Or, as many other requests have mention: change your highlighting engine to something that supports user-defined grammars or borrows from the wider ecosystem (VSCode and Eclipse have one way, LanguageServers are another...)

You may help us by providing a sample file that covers all edge cases.

Sure, here's a good sample file. Without using an LSP it would be impossible to highlight everything, since Elixir knows about "embedded strings that are an HTML template".


Standard Elixir source file, with comments, etc. for highlighting:

base32_crockford.ex


.heex template file:

new.html.heex

Hello,

There are also some existing implementations that might help ?

For example :

- highlight.js : https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md

- vs-code Elixir plugin : https://github.com/timmhirsens/vscode-elixir