Sanjibukai

Sanjibukai

Suggestion of a color theme (syntax highlighting) for Elixir?

Hello Everybody,

Does anyone know a good color scheme for syntax highlighting adapted to Elixir.
In my case I’m using VSCode.
I tried some Color Themes dedicated to Elixir found on the extension market but even so I found them not suited for Elixir.
For example when using an inline def, none of them highlights correctly the do: like the def.
I know that it’s in fact a keyword (even in the implementation) but semantically I wanted the do: to be the same as the def.

Anyway, if anyone have a good suggestion I’ll be happy to try it..
Thank you..

Edit: I’ll also try to look at how syntax highlighting works (probably a lot of regex) and I’ll try to tinker with it myself..

Most Liked

lucaong

lucaong

:do is definitely a valid atom, and indeed the do: in def something, do: ... is just a normal atom key in a keyword list. So having a special rule for :do atoms would probably not work well.

By the way, really nice theme, I would love to see a port to Vim to be able to use it in my everyday editor :slight_smile:

LostKobrakai

LostKobrakai

They just atoms, that’s true, but they’re also special cased by being reserved words in elixir:

  • true , false , nil - used as atoms
  • when , and , or , not , in - used as operators
  • fn - used for anonymous function definitions
  • do , end , catch , rescue , after , else - used in do/end blocks
mindok

mindok

Pretty well all the recent knowledge of VS Code themes is collected into this thread:

Where Next?

Popular in Discussions Top

thojanssens1
It would be nice to be able to define a redirect from one route to another from the router.ex file. E.g.: redirect "/", UserController, ...
New
crispinb
On reading dhh’s latest The One Person Framework it strikes me that Phoenix with LiveView is already pretty much this. However, never hav...
New
pillaiindu
I want to convert a Phoenix LiveView CRUD website to a CRUD mobile app. What do you think is the easiest way to do so?
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14027 124
New
lorenzo
Hey everone! I created a prototype for my app using Nodejs for the api. But the framework I chose wasnt great (in general theresnt any g...
New
ejpcmac
I have discovered Nix last month and I am currently on my way to migrating to it—both on macOS at home and the full NixOS distrubution at...
New
AstonJ
If so I (and hopefully others!) might have some tips for you :slight_smile: But first, please say which area you’re finding most challen...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
axelson
Decided against including more info in the title, but the gist is that Plataformatec sponsored projects will continue with the assets bei...
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement