Describe the bug
Wrong scala project root path detected.
Command "metals-emacs" is present on the path.
Found the following clients for /home/madper/source/mon/src/main/scala/Main.scala: (server-id metals, priority -1)
The following clients were selected based on priority: (server-id metals, priority -1)
2020.05.14 00:42:35 INFO logging to file /home/madper/.metals/metals.log
2020.05.14 00:42:35 INFO started: Metals version 0.9.0 in workspace '/home/madper'
2020.05.14 00:42:36 INFO time: initialize in 0.67s
Creating watch for /home/madper
2020.05.14 00:42:40 INFO skipping build import with status 'Requested'
The build.sbt located in /home/madper/source/mon/build.sbt. (And there is no /home/madper/build.sbt). Not sure why it use /home/madper as project root.
To Reproduce
Expected behavior
The project root should be the real project root.
Which Language Server did you use
lsp-metals
OS
Archlinux
Error callstack
[Trace - 12:42:35 AM] Sending request 'initialize - (1)'.
Params: {
"processId": null,
"rootPath": "/home/madper",
"clientInfo": {
"name": "emacs",
"version": "GNU Emacs 28.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.17, cairo version 1.17.3)\n of 2020-04-30"
},
"rootUri": "file:///home/madper",
"capabilities": {
"workspace": {
"workspaceEdit": {
"documentChanges": true,
"resourceOperations": [
"create",
"rename",
"delete"
]
},
This is what you have selected as a root. Lsp-mode uses projectile or project.el to guess the root but it is always confirmed by the user by default. To validate that do M-x lsp-workspace-folders-remove and then reopen that file.
Aha, you are correct. Thanks tons for the help! :-)
Most helpful comment
This is what you have selected as a root. Lsp-mode uses projectile or project.el to guess the root but it is always confirmed by the user by default. To validate that do M-x lsp-workspace-folders-remove and then reopen that file.