Questions tagged [scala-metals]

Scala language server with rich IDE features

Metals

Scala language server with rich IDE features

See: https://scalameta.org/metals/

46 questions
1
vote
0 answers

Lsp-metals submode fails to detect metals already installed in the system

I have Ubuntu system that i was trying to install scala development environment to. I ahve installed coursier and from it installed everyting else - scala, sbt, metals. I have added that to the PATH, and now all those things open from command line…
Srv19
  • 3,458
  • 6
  • 44
  • 75
1
vote
0 answers

Add hook after lsp-execute-code-action in doom-emacs

I work in doom-emacs with LSP-metals(scala LSP client). My inconvenience is when I execute action I need additional action saving the buffer to trigger LSP-server for recompilation and show an updated errors list. For example, import needed class…
skilgal
  • 172
  • 1
  • 4
  • 14
1
vote
1 answer

How to exclude scala formatting for html files using vs code

I am using vs code for my scala/play application. Whenever I save my main.scala.html layout file, the formatting screws up my references to my assets files. It inserts a space and my references to my css and js files fails.
Blankman
  • 259,732
  • 324
  • 769
  • 1,199
1
vote
1 answer

Indentation 4 spaces is not working in scalafmt.config in VS Code

I am trying to setup scalafmt.config, such that it formats my code. All the features I am using -- such as align.preset = more, align.openParenDefnSite = false etc. -- seem to work perfectly. However, I have an issue with indentation. I want to set…
1
vote
0 answers

How to properly install scala metals lsp in spacemacs

The title says it all, I want to install scala metals LSP in spacemacs, I did try the official metals/spacemacs tutorials without…
Haroun Mohammedi
  • 2,404
  • 12
  • 25
1
vote
1 answer

VS Code and Metals: Run 'Build import' to enable code navigation

I have a Scala- / Mill-Project that I wan't to import into VSCode. The Metals Doctor gives me the following warnings: Is there something missing in my project? Here is my Mill configuration (build.sc): import mill._ import mill.define.Target import…
pme
  • 14,156
  • 3
  • 52
  • 95
0
votes
0 answers

VS Code metals extension "New Scala project" button does not work

#Hi all, i am new to scala, please don't judge. The metals extension does not start a new scala project nor does it start metals if i do click the button below it.I have opened a folder "Temp" on the desktop and it is empty, it has no other files or…
oxicage
  • 1
  • 1
0
votes
0 answers

generate Scala test class in VS Code

I have written a Scala class in my project and wish to stub the corresponding src/test/**/TestClass.scala by some magical key command or equivalent. Is there a way to do this that is hidden within VS Code or Metals? edit: I was too general here. I'm…
0
votes
0 answers

vscode metals plugin: case-insensitive code completion

I am trying to write scala code in vscode, but defualt behaviour of metals plugin is case-sensitive code completion, any method to change it into case-insensitive? I have read this docs but don't find useful info.
ckf104
  • 61
  • 1
  • 4
0
votes
1 answer

Why does Spark SQL fail, but Spark core works after fresh installation (Scala)?

Why am I able to run Spark core, but not Spark SQL in Scala after fresh installation? My build.sbt looks something like that: scalaVersion := "2.13.8" name := "hello-world" organization := "ch.epfl.scala" version := "1.0" libraryDependencies +=…
0
votes
0 answers

Is there a way to have spaces in a path for scala worksheets

I am new to programming in Scala and wondered if there is a way to keep spaces in my folder directories when using scala worksheets in VS Code. I have my folders and files stored in OneDrive and they are structured to include other files outside of…
0
votes
0 answers

How can I get the type information at point?

When I put my cursor within a function that as additional function calls. The status bar appears to only show the type information for the outer most variable. I see the type for clientFutureBackend whereas I'd expect to see type info for…
irregular
  • 1,437
  • 3
  • 20
  • 39
0
votes
1 answer

How to launch locally built metals language server?

I am trying to set up emacs as scala editor. To that end i am trying to install metals for corresponding modes to work. However, for some reason or another, metals either failed to install from emacs, or when installed with Coursier, were not…
Srv19
  • 3,458
  • 6
  • 44
  • 75
0
votes
0 answers

SBT can't seem to download dependencies

It appears that SBT can't find any of the dependencies needed, as well as both blooper and sbt can't seem to connect online to download any dependencies. I have checked if I have a proxy, if there are any inconsistent versions that are conflicting,…
Lucasino
  • 1
  • 1
0
votes
1 answer

Metals on Atom not able to run project

This might be a really silly question, but I am unable to find anything in the web, so maybe someone can help me. I am currently learning Scala and because i don't like IntelliJ, i switched to vim and sometimes VSCode with metals and sbt to run my…
Frobeniusnorm
  • 272
  • 1
  • 8