popo63301
Hello !
I would like to prevent automatic parentheses while coding in Elixir in VSCode.
I can’t see where to configure that.
Any suggestions ?
Trending in Questions
One of my LiveView view’s has a very heavy javascript dependency so I want to avoid loading it for every page on the site, while still us...
New
Hi all!
I know that quite a few people use Phoenix LiveView but it is hard to get a more up-to-date list of folks/companies using it. I ...
New
Hello everyone!
I am new to coding with Elixir/Erlang. And i am looking for some utilities for fuzzing testing like AFL++.
Does anyone ...
New
I’m very new to Elixir, so sorry if this is a silly question:
I am wondering what happens to the mailbox of a process when the machine i...
New
I load tested a plain Phoenix chat app backed by Postgres with 100 million messages in it, everything on default settings, to see what br...
New
Background
When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error:
* assembling mark...
New
Is there a way to import record definitions in the iex shell for pretty printing (similar to the rr command in the erl shell)? This woul...
New
Other Trending Topics
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
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hi everyone :waving_hand:
I’ve been working on PhiaUI, an open-source UI component library for Phoenix LiveView, and I wanted to share i...
New
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
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #ai
- #authentication
- #elixirconf-us
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-eu
- #distillery
- #security
- #processes
- #api
- #forms
- #hex











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
cmo
The elixir formatter doesn’t have much in the way of options. The idea is that you accept how it is and move on with your life, free from worrying about formatting.
There are libraries, ecto, phoenix etc, that tell it not to add them to some macros, which you need to add to
formatter.exs.If you’re just talking about it creating the second bracket, look in the VS Code settings.
adamu
The good news is, that’s one of the few customisable options.
The bad news is, you have to specify every function name and arity where you don’t want it to automatically add the parenthesis.
Check out the
mix formatandCode.format_format_string/2docs. You’re looking for:locals_without_parens.See Plug for an example.
opsb
I’ve also had this issue. The config is in formatter.exs and running
mix formatworks as expected. In vscode though it only works intermittently, the rest of the time it will start adding brackets in again.BartOtten
Is this about them being added ‘on format’ or during typing? The latter seems like an option which is editor specific….
popo63301
I have to precise. It’s annoying for 2 particular situations:
Macros like
addandfield(in Ecto Migrations and Schemas)cmo
Have you got the
inpit_depsset in.formatter.exs? Theectosetting should stop that. However, as someone pointed out, it will randomly screw it up every now and then. You have git to save you in those instances.Ivor
I just ran into this issue and found this thread. Then I added and removed a
depand rearranged the order and then the parentheses went away when I saved. In my case this was for thepropdeclaration in surface.Not sure if this was just luck or whether it helped. Can’t reproduce it now because problem is fixed and the parentheses are being removed. Hopefully this helps someone else test it in the future.
fteschke
I experienced the same issue.
Similar to @Ivor, resetting the dependencies helped me.
rm mix.lock; rm -rf _build; rm -rf deps; mix deps.getBefore: Parantheses added by
mix format, e.g. to ectofieldmacro.After: Parantheses no longer added.
I did not test if all the steps were necessary, or if a single one of them might have helped.
greven
This is a bug with ElixirLS and it’s a trick one, it has to do with race conditions.
It’s being tracked here: Formatter doesn't respect formatter.exs while your code is still compiling · Issue #526 · elixir-lsp/elixir-ls · GitHub
rorscharg
Runing
MIX_ENV=test mix compile --forceand restarting VSCode seems to fix it for me.