lukertty
Install web-mode and mmm-mode first and put this in your config file:
(require 'mmm-mode)
(require 'web-mode)
(setq mmm-global-mode 'maybe)
(setq mmm-parse-when-idle 't)
(setq mmm-set-file-name-for-modes '(web-mode))
(custom-set-faces '(mmm-default-submode-face ((t (:background nil)))))
(let ((class 'elixir-eex)
(submode 'web-mode)
(front "^[ ]+~L\"\"\"")
(back "^[ ]+\"\"\""))
(mmm-add-classes (list (list class :submode submode :front front :back back)))
(mmm-add-mode-ext-class 'elixir-mode nil class))
(define-advice web-mode-guess-engine-and-content-type (:around (f &rest r) guess-engine-by-extension)
(if (and buffer-file-name (equal "ex" (file-name-extension buffer-file-name)))
(progn (setq web-mode-content-type "html")
(setq web-mode-engine "elixir")
(web-mode-on-engine-setted))
(apply f r)))
![]()
Trending in Guides/Tuts
You probably already know that <span>{nil}</span> in a HEEX template produces <span> </span> when rendered. I fin...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #elixirconf-us
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
jsmestad
I was unable to get syntax highlighting to update when modifying the LiveView sigil so I put together a similar solution based on polymode (instead of mmm-mode).
https://blog.evalcode.com/phoenix-liveview-inline-syntax-highlighting-for-emacs/
AndyL
Next version of Neovim (0.5.0) uses the tree-sitter parser for syntax highlighting. Does anyone know how to configure tree-sitter to syntax-highlight embedded sub-languages like leex and sub-sub languages like surface?
axelson
Before tree-sitter will be usable with Elixir someone will have to write a tree-sitter elixir grammar. I’m aware of a few attempts, but as far as I’m aware none of them are close to being usable.
Most recent semi-active projects:
Older stalled projects:
I too am very interested in having tree sitter grammars (and even took a very short stab at writing one). Overall I like tree-sitter’s approach over a large number of brittle regular expressions.
ananthakumaran
FYI, I am taking a stab at the grammar as well. GitHub - ananthakumaran/tree-sitter-elixir · GitHub
mrjbj
I havent’ been able to get this to work after several days of effort. I am able to see the mode indicator change, but the syntax highlighting in the ~L buffer, just won’t adjust. Perhaps it’s related to doom/evil mode, but not sure how to fix. Would be great if you have any further pointers. Thanks, jbj