Gusti
Hi,
I cannot get VS Code with the elixir-ls extension to format my code.
Only thru “mix format” command.
Environment:
Erlang/OTP 23 [erts-11.0.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Elixir 1.11.3 (compiled with Erlang/OTP 23)
elixir-lsp.elixir-ls-0.6.2
I even tried after recompiling elixirls with my current elixir installation.
I have configured VS Code settings.json, to specify ‘elixir-lsp.elixir-ls’ as the default formatter.
Any ideas what other things I need to tweak in order for it to work?
Best regards,
Gusti.
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
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
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
So i have been using ash framework for a while and i love it. However currently the issue im having with ash framework is the error handl...
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
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
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
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
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex











Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
axelson
Hi
! Are you running the “Format Command” in VSCode (defaults to alt+shift+f)?
If that isn’t working then try running through the debugging steps: GitHub - elixir-lsp/vscode-elixir-ls: Elixir language support and debugger for VS Code, powered by ElixirLS. · GitHub
Gusti
I tried with keyboard secuences alt+shift+f.
I also tried with Ctrl+shift+p, then “Format document”
Nothing happens.
View output:
Started ElixirLS v0.6.2
Elixir version: “1.11.3 (compiled with Erlang/OTP 23)”
Erlang version: “23”
ElixirLS compiled with Elixir 1.8.2 and erlang 21
MIX_ENV: test
MIX_TARGET:
[Info - 12:40:35 PM] Compile took 550 milliseconds
[Info - 12:40:35 PM] [ElixirLS WorkspaceSymbols] Indexing…
The toggle developer tools output is:
electron/js2c/renderer_init.js:15 (electron) Security Warning: webFrame.executeJavaScript was called without worldSafeExecuteJavaScript enabled. This is considered unsafe. worldSafeExecuteJavaScript will be enabled by default in Electron 12.
log @ electron/js2c/renderer_init.js:15
electron/js2c/renderer_init.js:135 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security
Policy set or a policy with “unsafe-eval” enabled. This exposes users of
this app to unnecessary security risks.
For more information and help, consult
Security | Electron.
This warning will not show up
once the app is packaged.
(anonymous) @ electron/js2c/renderer_init.js:135
workbench.html:1 A cookie associated with a cross-site resource at https://open-vsx.org/ was set without the
SameSiteattribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set withSameSite=NoneandSecure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at Chrome Platform Status and Chrome Platform Status.webviewElement.ts:90 [Embedded Page] %cElectron Security Warning (enableBlinkFeatures) font-weight: bold; This renderer process has additional “enableBlinkFeatures”
enabled. This exposes users of this app to some security risk. If you do not
need this feature, you should disable it.
For more information and help, consult
Security | Electron.
This warning will not show up
once the app is packaged.
webviewElement.ts:90 [Embedded Page] (electron) Security Warning: webFrame.executeJavaScript was called without worldSafeExecuteJavaScript enabled. This is considered unsafe. worldSafeExecuteJavaScript will be enabled by default in Electron 12.
webviewElement.ts:90 [Embedded Page] %cElectron Security Warning (Insecure Content-Security-Policy) font-weight: bold; This renderer process has either no Content Security
Policy set or a policy with “unsafe-eval” enabled. This exposes users of
this app to unnecessary security risks.
For more information and help, consult
Security | Electron.
This warning will not show up
once the app is packaged.
webviewElement.ts:90 [Embedded Page] %cElectron Security Warning (enableBlinkFeatures) font-weight: bold; This renderer process has additional “enableBlinkFeatures”
enabled. This exposes users of this app to some security risk. If you do not
need this feature, you should disable it.
For more information and help, consult
Security | Electron.
This warning will not show up
once the app is packaged.
webviewElement.ts:90 [Embedded Page] (electron) Security Warning: webFrame.executeJavaScript was called without worldSafeExecuteJavaScript enabled. This is considered unsafe. worldSafeExecuteJavaScript will be enabled by default in Electron 12.
webviewElement.ts:90 [Embedded Page] %cElectron Security Warning (Insecure Content-Security-Policy) font-weight: bold; This renderer process has either no Content Security
Policy set or a policy with “unsafe-eval” enabled. This exposes users of
this app to unnecessary security risks.
For more information and help, consult
Security | Electron.
This warning will not show up
once the app is packaged.
log.ts:191 WARN Settings pattern “workbench.fontAliasing” doesn’t match any settings
log.ts:191 WARN Settings pattern “settingsSync." doesn’t match any settings
log.ts:191 WARN Settings pattern "sync.” doesn’t match any settings
Gusti
But these electron warnings were there at the start of VS Code, before I tried to format.
Gusti
As I could not get it work, I created a VSCode Task, to execute “mix format”, and assigned it a keyboard sequence.
So, instead of pressing just Ctrl+S to save my file and format it, I need to press another key sequence after the save. It is not terribly bad. It’s a workaround, until somebody enlightens me.
Best regards,
Gusti.
hoetmaaiers
Hi, I experience the same problem, the format command from VSCode does not trigger
mix format. When runningmix formatfrom the CLI this goes well.My Elixir-ls output log looks fine:
What else should I check into?
mattbaker
I’d bounce over to Issues · elixir-lsp/elixir-ls · GitHub to see if there are any similar issues logged (and create one if not).
Sebb
Beware, that the code is not formatted if there are syntax errors.
mattbaker
FWIW I’ve been having trouble too (formatter.exs seems to not be respected) and rolled back to the previous version, I just haven’t been able to gather enough details to post a helpful issue yet
It doesn’t seem related to the existing issue about formatter.exs during compilation, but I need to double check first.
jameskent
Try
ctrl + shift + I. CheckFile, Preferences, Keyboard shortcuts.