-
Notifications
You must be signed in to change notification settings - Fork 6
Will not format- (Mix) Could not find an SCM for dependency :credo #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I was looking into this and got distracted with something else. Funnily enough, I just coincidentally got the same error, but with Now the question probably is why the |
Yes I'm using @princemaple that is another can of worms. I've come to really like Sublime (since the death of Atom) I just can't seem to get anything Elixir working - not good since that's my fulltime gig. |
I also work as an Elixir dev and Sublime Text has been working great so far. Try switching to NixOS – which I did recently – if you wanna start doubting your sanity... It's so damn hard until you've learned enough to know the ropes. 😅 So Let's try to debug this. Open your Sublime console and try these Python code snippets: # Print $PATH
os.environ['PATH']
# Call `which mix`
import subprocess; subprocess.Popen(["which", "mix"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
# Call `mix hex.info`
import subprocess; subprocess.Popen(["mix", "hex.info"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() |
Thanks @azizk I almost always start it from my shell
Is this then just a matter of setting: |
I added:
To |
Hey, you're welcome! For future reference: I assume your settings look something like this: {
"command": ["elixir-ls"],
"enabled": true,
"env": {
"PATH": "/Users/travis/.asdf/shims/mix"
}
} I'm a bit curious but also confused how that solved the issue. So I guess you're using LSP's format command now, instead of |
I think I closed this prematurely. @azizk that's essentially what I had.
LSP-elixir.sublime-settings:
While that got the LSP working it never actually got format on save working, I can run a command from the the pallet "LSP Format File" and that works but it dosen't format when I save. So then I jump back into trying to get ElixirSyntax working: ElixirSyntax.sublime-settings :
That leads to this error:
I think with this info the issue is pretty straightforward, it's pulling a super old version of hex that's been hanging around in an |
Do you see lsp-elixir at bottom left corner? (status bar) |
Not much time atm, but I'll try to help.
The
Well, the path |
I'll try and dig from the LSP side.
If you run this command
|
Thanks for helping out with this @princemaple and @azizk. @princemaple when I look at the logs starting I see a bunch of plugin reloads but nothing like what you are indicating. These seems to be the most related lines:
After adding the debug logs I see this in the panel when I save:
|
That is a known issue but probably isn't the real cause. Do you see a crash dump at your project root? If you are on OTP 26, it's expected to crash elixir-ls compiled from low OTP version (lsp-elixir by default uses a lower version for best compatibility). I've just released a new patch version to mitigate the python issue. I see you have successful communication logs with the server, so I guess you are not on OTP 26, and the server indeed wasn't simply killed by the python issue. As you are not seeing the {
"lsp_format_on_save": true
} |
I'm on OTP 25. |
That's rather odd. I'm out of ideas. You might want to ask in LSP channel on sublimehq Discord. |
I asked on Discord. Got a couple good answers. Do you have vintage or neovintageous installed? How do you save the file? LSP has this command LSP comes with this key binding: {
"keys": ["primary+s"],
"command": "lsp_save",
"context": [{"key": "lsp.session_with_capability", "operand": "textDocumentSync.willSave | textDocumentSync.willSaveWaitUntil | codeActionProvider.codeActionKinds | documentFormattingProvider | documentRangeFormattingProvider"}]
}, If you aren't using |
Oh snap! It's that keybinding. My key map didn't have it, I don't know why. Thank you so much, you are a god among humans. |
😄 |
Sorry if this is a duplicate, or has been answered elsewhere.
I've turned on "mix_format" "on_save", it works in one project, but every other Elixir project I have I get this error in the console:
This happens both when I try to save and when I manually run
mix format
from the command pallet. Runningmix format
in the terminal works without any issues, and generally speaking the project is up to date and working well (and can format in other code editors).My user settings for the plugin are:
The text was updated successfully, but these errors were encountered: