I need to improve the experience on that front. The build can fail for hundreds of reasons and asking the user to run mix deps.get on every failure would be misleading
I was getting the “Unable to find formatter” error in an umbrella app (auction_umbrella in “Elixir in Action 1.4”), but I really didn’t care if my code was formatted according to some spec. However, when I opened a terminal window in vscode, that blasted error message would popup and cover the output in the terminal window–now the formatter error was a problem! I searched around trying to find a solution–without any success, and finally I just unnistalled ElixirLS in vscode, quit vscode, relaunched vscode, and reinstalled ElixirLS in vscode, and now the error is gone. We’ll see if that remains the case.
Just adding in I had this for weeks on latest version of ElixirLS (0.23.1). Elixir 1.17.2, OTP 27. Tried installing older versions, uninstalling, reinstalling. Nothing worked. Eventually I uninstalled, trashed the .elixir_ls folder, reinstalled an older version and then upgraded Elixir LS and it worked!
Do you know which older version you installed? I’ve tried many combinations and nothing works
Same error here :
Unable to find formatter for /Users/goulvenclech/Documents/encheres_immo/lib/encheres_immo_web/components/form/combobox.ex: "** (Mix.Error) Formatter plugin Surface.Formatter.Plugin cannot be found
(mix 1.17.2) lib/mix.ex:588: Mix.raise/2
(language_server 0.23.0) lib/language_server/mix_tasks/format.ex:302: anonymous fn/2 in Mix.Tasks.ElixirLSFormat.load_plugins/1
(elixir 1.17.2) lib/enum.ex:2531: Enum.\"-reduce/3-lists^foldl/2-0-\"/3
(language_server 0.23.0) lib/language_server/mix_tasks/format.ex:299: Mix.Tasks.ElixirLSFormat.load_plugins/1
(language_server 0.23.0) lib/language_server/mix_tasks/format.ex:362: Mix.Tasks.ElixirLSFormat.formatter_for_file/2
(language_server 0.23.0) lib/language_server/source_file.ex:277: ElixirLS.LanguageServer.SourceFile.formatter_for/3
(language_server 0.23.0) lib/language_server/providers/formatting.ex:13: ElixirLS.LanguageServer.Providers.Formatting.format/4\n (language_server 0.23.0) lib/language_server/server.ex:1280: anonymous fn/3 in ElixirLS.LanguageServer.Server.handle_request_async/2"
Erlang/OTP 26
Elixir 1.17.2
ElixirLS plugin v0.23.1
ElixirLS v0.23.0
VScode 1.92.2 (Universal)
MacOS 14.5 (23F79)
Fixed by following @cgraham tips and restarting VScode.
0.20.0 worked for me.
Thank you. I’m not sure what happened, I had given up and didn’t do anything else, but at some point the formatter started working again. So it looks like the procedure worked, but maybe it took a while for the tools/cache to build in the background so I didn’t detect it working
Thanks to all