sodapopcan

sodapopcan

Hello fellow Vimmers!

I don’t know how many of you are out there since it’s my impression that this community seems to rally around VSCode (which is totally cool).

I’ve just opened up a PR in vim-elixir which makes some strides in fixing the indentation problem in LiveView and Surface inline templates. I’m looking for folks who would be willing to try it out for the next week or so and report any bugs/requests to me. Code-reviews would be welcome too!

Here’s the PR:
https://github.com/elixir-editors/vim-elixir/pull/538

Here is my fork:
https://github.com/sodapopcan/vim-elixir
Make sure you’re on the autoindent-embedded-views branch if you clone this one.

Thanks!

Showing Posts 1 to 3

sodapopcan

sodapopcan OP

I just wanted to bump this. This has proven to be quite difficult (no surprises there) but I’ve been using this the past week and seems ok. I’m still wondering if anyone else can try this out and report back to me—it’s very hard to cover the all the edge-cases.

Also, for endwise.vim users, I was able to get a PR merged that fixes the whole inline fn -> end issue. I’m not sure how many people were feeling that pain as there was an issue open for over two years, or something like that, about it.

Ok, thanks!

cigrainger

cigrainger

Hey! I was just looking at this PR today. Fantastic work. This is something that’s been hurting me. I’ll be able to have a proper play with it tomorrow and report back. Thanks for doing this.

sodapopcan

sodapopcan OP

Awesome, thank you! The logic hasn’t gotten quite complex. I can probably simplify it a bit but I’m trying to cover some different known styles I’ve seen. One thing that can’t be supported (and doesn’t appear to be supported in regular html formatting) is self-closing tags without the />. I’m also not bothering with extra weird stuff that I never see that is still valid HTML (like having whitespace between between the opening brace and the tag name (< p>, for example).

I’m trying to support both these styles for eex and Surface:

| represents the cursor after a new line.

<%= live_component @socket,
   Component,
   id: "id",
   foo: "foo" %>
|

<%= live_component @socket,
   Component,
   id: "id",
   foo: "foo"
%>
|

<%= live_component @socket,
   Component,
   id: "id",
   foo: "foo" do %>
  |
<% end %>

<%= live_component @socket,
   Component,
   id: "id",
   foo: "foo" do
%>
  |
<% end %>

<Component
  foo="foo" />
|

<Component
  foo="foo"
/>
|

I’m not sure if anyone does anything else but I’d be interested to know.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
georgeguimaraes
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews