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

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
After reading the below in another thread… It got me wondering how many firms are actually using or encouraging their developers to use...
New
mhanberg
Hi y’all! I have started a dedicated Elixir plugin for Neovim. It is still early days, but please check it! GitHub - elixir-tools/elixir...
New
aziz
I’m happy to finally present to you the best Sublime Text package for Elixir, templates and more! :partying_face: :confetti_ball: Elixi...
New
dewetblomerus
Setting up Cursor Background Agents to work with Elixir was a pain, which led me to publish a Docker image just for this and write a blog...
New
renews
Hello everyone, today I created a simple Neovim plugin to check for new versions of packages used in the project, not sure if it is usefu...
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
Dusty
New England download page New England repo I am a long-time dark theme user, but I recently developed an interest in coding on a light ...
New
JoeZMar
After the keyboard thread has convinced me to purchase a UHK I wanted to make one about the mouse. Switching to a programmable keyboard h...
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

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
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

We're in Beta

About us Mission Statement