Closed vasigorc closed 3 weeks ago
Closing this, the problem was that I had this line "scalafmtConfigPath": ".scalafmt.conf"
in my ~/.confid/zed/settings.json
but scalafmt wasn't configured for the project in question. Keeping this config only in settings file of projects that do use Scalafmt fixed the issue. I found this out by looking into metals.log
:
2024.11.05 12:18:27 ERROR Failed to connect with build server, no functionality will work.
java.nio.file.NoSuchFileException: <MY_PROJECT>/.scalafmt.conf
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
at java.nio.file.Files.newByteChannel(Files.java:371)
at java.nio.file.Files.newByteChannel(Files.java:422)
at java.nio.file.Files.readAllBytes(Files.java:3206)
at scala.meta.internal.io.PlatformFileIO$.slurp(PlatformFileIO.scala:42)
at scala.meta.internal.io.FileIO$.slurp(FileIO.scala:18)
Hello,
it's more of a question, rather than an issue. If there is a better alternative to finding out things about how to use the extension (Stakoverflow tag, maybe something else) - please let me know.
Context
It's my first time trying to set-up a Scala project with Zed. Here is the relevant part from
~/.config/zed/settings.json
:Here is the last line from my
~/.zshrc
file:I did install
metals
via Coursier as suggested. I am on MacOS Sonoma 14.6.1 (23G93)Problem
When I am opening an existing Scala project, there is a pop-up telling me abot failure to connect to metals server:
Here are (what I thought were) relevant entries from
~/Library/Logs/Zed/Zed.log
:ℹ️ I've replaced sensitive information with pseudo tags
<MY_HOME>
and<MY_PROJECT>