aziz
I’m happy to finally present to you the best Sublime Text package for Elixir, templates and more!
![]()
ElixirSyntax – The most powerful Elixir for the most Sublime experience.
In this latest v2.2.0 release I have added support for HEEx and Surface!
@princemaple is the original maintainer of the project. ![]()
I started making lots of contributions in 2019. Over 6 months in the making, the package has undergone a complete rewrite by me and was first released in April this year. After many more improvements and heavy polishing I decided it’s ready to be announced to the wider public.
Q&A
This is crazy good! Why did you do this?
I spend up to 7 work hours in the editor each day.
I like my tools to be finely honed in order to be efficient and to enjoy my craft.
Why use ST4 with this plugin?
It all comes down to personal preferences. My top reasons for using ST are:
- Speed of: startup, typing, rendering, searching, plugins
- Low memory usage
- Git integration
- Easy-to-use GUI
Is it perfect?
By no means, no. Neither is Sublime Text nor the package. ST4 has received great updates and a much better syntax highlighting engine is one of them. However, the engine still has limitations and some fundamental issues remain. The syntax definition language in YAML with regular expressions is also not the best possible way to define a computer language grammar.
What about the elixir-tmbundle package?
Josè based it off of a Ruby package and I think it served its purpose well. There’s a ticket on Github discussing my efforts.
I incidentally met José last week at ElixirConf and we talked about this stuff. He promised he’d try out my package soon. I hope you will now, José! ![]()
What about alternative editors?
There are plenty and I have tried many. Even if some of them are incredible I just can’t use them for one reason or another. Mainly for the top reasons I mentioned above.
I’m following the tree-sitter project with great interest and hope that it will be combined with a great editor in the near future. I will consider switching from ST as soon as that happens (note: ST won’t be using tree-sitter). I know there are projects like NeoVim and others but nothing stable and attractive afaics.
Can I somehow highlight code for my slides?
Of course! Just select some code, open the console panel (Ctrl+`) and enter view.export_to_html(view.sel()).
I have seen so many slides with Elixir code in them and the highlighting was just not the best it could be. I hope speakers take notice and create more beautiful slides from now on in the future. ![]()
![]()
Enjoy!
Trending in Dev Env & Tools
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 41 to 32- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
aziz
You’re welcome, @distefam!
It’s a shame that Zed has this text rendering issue on LoDPI screens. It doesn’t really seem that bad on my external monitor. The text could certainly be sharper, but it’s almost unnoticeable.
I’ve successfully avoided VSCode the whole time, so I hope Zed will not go down a similar road. I think they do place importance on keeping things lean, tidy and fast. There are already some complex features like the AI assistant or Collaboration, but I think they don’t get in your way at all.
I didn’t think it possible so soon but I’m already using Zed daily for work. Of course, it’s not as polished as ST but the ability to properly select syntax nodes alone along with other nice things is enough to make me happy and tolerate minor annoyances.
distefam
Thanks for the update, @aziz. I’m still sticking with SublimeText for now and this is much appreciated. I, too, have been eyeing Zed. Unfortunately, Zed has an issue that makes it completely unusable for me. And, my concern about Zed is that it might become the next VS Code in terms of clutter and lack of focus. I still prefer SublimeText for this reason, but I do agree that the community surrounding it, including package development, seems to have waned. I’ve still yet to find an editor that gets out of my way as much as possible as Sublime, but hoping that Zed can resist the siren call of becoming too complex.
aziz
Hey, everyone! I can finally announce version 4 of this plugin:
However, I’d also like to inform you that this will be the last version I’m going to release, except perhaps for minor bug-fix releases.
ST has served me well over the years, but I’m excited about Zed and plan on switching to it completely eventually. Zed isn’t quite there yet, but it’s in active development and becoming more and more usable with each release. Some of the reasons I wish to switch to Zed are:
mix format, ST loves to just jump up several pages. (It seems this is affected by how many files are open.)Anyway, I hope the plugin has been useful to many developers so far and wish you continued happy and productive coding with the tool of your choice!
aziz
Hi, @distefam! That’s interesting! Thanks for pointing this out. I’ve been checking out what the plugin is capable of, but I’m not sure how it could join forces with ST. Sublime’s syntax engine isn’t really controllable through Python code. You can add individual text regions with styles on top of the already highlighted code, but it would be crazy inefficient and slow to highlight views solely with TreeSitter’s AST info and ST API calls to
add_regions(). I imagine the plugin could be useful for code navigation or listing symbols, but then again LSP-elixir and ST already do that (for better or worse.)It isn’t really meaningful to adapt ElixirSyntax because ST syntax definitions (YAML files with stacked regular expressions) and TreeSitter grammars are different technologies. The only thing I believe would make sense is if ST ditched its engine and replaced it with TreeSitter entirely. But as I mentioned in my original posting, judging from an exchange on GitHub that’s probably not gonna happen. Who knows, maybe it will happen when TreeSitter editors start leaving ST in the dust, but for me there isn’t one out there yet that does it for me.
I’ll continue looking into this. It’s new and definitely exciting.
distefam
@aziz Now that there is a TreeSitter plugin for SublimeText, would it be possible to update/simplify ElixirSyntax to work with its definitions for nodes rather than the scopes provided by SublimeText? It might be that I’m not understanding what is possible with the API provided by the TreeSitter plugin though and that it might not be possible to develop a color scheme based on it for SublimeText.
aziz
Hey, no worries. Enjoy developing with
ElixirSyntax!abar
Hi aziz, sorry, my bad. In the process of recording a screencast for freezes, I have noticed that I have
ElixirSublimepackage activated too.Disabling it fixed the issue, now everything works as expected. My apologies for the distraction
aziz
Hi, abar!
That’s rather strange. I couldn’t reproduce the freezes using your examples. Maybe the set of plugins you have installed may cause negative interactions? Do you still have the
Elixirplugin installed?Please share your list of plugins if you don’t mind.
Also: can you make out what exactly spikes the CPU using htop?
abar
Hi everyone, just wanted to ask, if anyone else has freezes with
ElixirSyntax?I’m using it with Sublime Text 4 to edit a phoenix project (while
mix phx.serveris on), but even in a simple cases I get freezes that may last up to 2 seconds.One example:
defp format(n), do: n, as I typeddo:editor froze, had to wait a few seconds to seen. Another example: typing@constant []gives a freeze.And it’s not exclusive to typing, sometimes freezing occurs even if when I use backspace and delete whitespaces, for example.
It didn’t happen with any other plugins, and disabling
ElixirSyntaxseems to fix the issue. “I use arch btw” if that’s relevant.I tried to change
output_scroll_timein settings, but it changed nothing.Apart from that it is a great plugin, and I love the .heex file support - so I would like to see if there’s a way to get it working without those disruptive interruptions.
aziz
Hey! Those snippets are coming from elixir-ls and the LSP-elixir plugin. I don’t know if they are customizable, but as a work-around you can easily create snippets yourself:
Store this XML text in
Packages/User/Kernel.def.sublime-snippet: