kayoj

kayoj

Why Does Elixir Formatter Act Differently in Cursor AI vs Standard Setup?

Hello

I have been testing different environments for Elixir development & noticed something odd. When I run the Elixir formatter locally in my usual setup, it gives consistent results. :slightly_smiling_face: But when I try formatting the same code inside Cursor AI; the output sometimes looks slightly different, especially with long pipeline chains and spacing around function arguments.:innocent:

I’m wondering if anyone else has noticed this? :thinking: Could it be related to Cursor AI applying its own formatting rules on top of Elixir’s defaults, or maybe some hidden config I’m not aware of? :thinking: This makes it tricky when working in teams, since code styles should ideally stay the same across all environments.

For reference, here’s the official Elixir Formatter Guide. Any ideas on aligning Cursor AI with the standard Elixir formatter would be really helpful.:slightly_smiling_face:

Thank you !!:slightly_smiling_face:

#ai

Most Liked

sbuttgereit

sbuttgereit

I use Cursor and have it set up to format on save (via the formatter) and I haven’t noticed anything odd.

The behaviors closest to what you describe tend to be related to Cursor Tab. Cursor Tab autocomplete will sometimes sneak in when I’m not expecting it and make changes; this could go unnoticed if I was keyboarding around for other reasons, and this would also including it’s idea of formatting since it tries to add not just lines of code, but code in what it sees as a consistent format (consistent with what may vary).

I’ve found Cursor Tab to be kinda annoying and have it turned of and since then I really haven’t seen that sort of unnoticed strangeness, including in formatting. It’s a bit ironic because Cursor Tab was one of the bigger reasons I signed up for Cursor… but over time it became less helpful and more something I’d be continually contradicting.

Where Next?

Popular in Dev Env & Tools Top

AstonJ
While on the theme of routers: Is your computer's internet connection wired or wireless? (Poll) Which router do you use? How do you se...
New
nickurban
Cursor Cloud Agents are quite good at writing Elixir now, but only with a custom configuration. It took me a while to get this working p...
New
mveytsman
If you use vim, upgrade alchemist.vim to 2.8.0 as soon as possible!! There’s a bug that allows any website to take over your computer. ...
New
AstonJ
I’ve been reinstalling macOS after trying out Tahoe, and when I went to migrate from a Time Machine backup I got an error I’ve not see be...
New
ariandanim
Dear all, Does anyone has tried using ARM Laptop Snapdragon? I am planning to buy new one for my daily coding, but still need some sugg...
New
AndyL
With this week’s release, ElixirLS bundles an experimental MCP Server. (see CHANGELOG) Highlights Added Call hierarchy provider imple...
New
AstonJ
Inspired by @jdiago’s post containing this slide: I thought it would be interesting discussing what independent languages like Elixir...
#ai
New
AstonJ
Welcome to our thread for Mac users :smiley: Windows users please use this thread Linux users please use this thread For those who dis...
New
AstonJ
Welcome to our thread for Windows users :smiley: Mac users please use this thread Linux users please use this thread For those who dis...
New
SpaceVim
I am author of SpaceVim, As you know SpaceVim is a vim config which provide layer feature. I want to improve the elixir layer in Space...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
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
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New

We're in Beta

About us Mission Statement