ca1989
Hi all,
my editor (neovim + elixir-ls via coc.nvim) does format on save.
Randomly, it adds parenthesis around macros, so I have a diff looking like:
- get "/", PageController, :home
+ get("/", PageController, :home)
Is anyone experiencing something similar?
Thank you
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Other Trending Topics
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
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
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
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 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
linusdm
I’d guess this is related to this elixir-ls issue: Formatter doesn't respect formatter.exs while your code is still compiling · Issue #526 · elixir-lsp/elixir-ls · GitHub
If you wait for the underlying compilation to finish, the formatter options are respected again, which makes it seem random.
ca1989
Ah!
Thank you
elurker
Sorry to revive this, I’m experiencing this all the time in NeoVim (LazyVim). I’ve already updated all plugins to their latest versions, and using Eliixir 1.15. It doesn’t add parenthesis in VS Code. Not sure what else to try..
dimitarvp
Not sure if that helps but you could just specify these exceptions in your own
.formatter.exsin the root of your project. Here’s an example from one of mine:In this case, I don’t want
Ecto.Query.frombe given parentheses.dimitarvp
Oh, here’s a more detailed example:
dimitarvp
More info here: mix format — Mix v1.20.2
elurker
Thanks - I’ve tried that and even
[:*], and it doesn’t seem to have any effect..dimitarvp
Well admittedly I don’t use
coc.nvimso not sure I can help further. I use other NeoVim plugins.elurker
I don’t think mine uses coc either - here’s the list of the ones in use, I believe: LazyVim/lua/lazyvim/plugins/extras/lang/elixir.lua at 68ff818a5bb7549f90b05e412b76fe448f605ffb · LazyVim/LazyVim · GitHub (also
nvim-lintis enabled by default, whilenone-lsis not).So it does seem to use
elixir_lsunder the hood, but for some reason it only behaves correctly in VS Code wrt formatting (other functionality like linting works well).dimitarvp
Even though I use NeoVim for a year or so now, I am very slowly learning it (not enough time or energy to become a pro there at the moment). So not sure I can help – maybe try disabling
credo?