Skip to content
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

Support for Scala Metals #3345

Open
modoodalvi opened this issue Mar 29, 2021 · 9 comments
Open

Support for Scala Metals #3345

modoodalvi opened this issue Mar 29, 2021 · 9 comments
Labels
A-extension Area: Extension/plugin integration, vscode or VimL bug Something isn't working L-scala Language: Scala

Comments

@modoodalvi
Copy link

Installing VS Code extension scalameta yields following error message on restart

error

@nolondil
Copy link

Additionally, it looks like the extension scala-lang is no longer able to apply syntax colour once Metals is running. Any new Scala file has no syntax colouring but metals is able to compile it (or Scala file that was not open yet before metals started).

@zetashift
Copy link

zetashift commented Mar 29, 2021

You have to install this plugin too: https://open-vsx.org/extension/scala-lang/scala to make it work correctly!
You'll still get an error but AFAIK it doesn't hamper functionality.

Also if anybody knows how to copy errors from the notifications pane I'd like to know!

image

@modoodalvi
Copy link
Author

modoodalvi commented Mar 30, 2021

OK after installing the sclala plugin as suggested in the error message and by @zetashift , I get
error This notification is sent quite often during manipulation of files.
Screenshot 2021-03-30 at 20 53 48

I am not able to create Scala classes. Error messages are not shown correctly.

@bryphe bryphe added A-extension Area: Extension/plugin integration, vscode or VimL L-scala Language: Scala labels Mar 31, 2021
@bryphe
Copy link
Member

bryphe commented Mar 31, 2021

Interesting, I tried the Scala + Scalametals plugin on a simple, 'hello-sbt' project, and didn't see those errors. It might be something special about the configuration of the project.

A couple of bits of info that might help, @modoodalvi

  • Which platform is this? OSX, Linux, Windows?
  • Is the project open-source - can I try building / opening it?

It's possible this error, like the one in #3311 (comment) - occurs in VSCode, but doesn't get surfaced like in Onivim.

I am not able to create Scala classes. Error messages are not shown correctly.

Do you have more details about this - when you say not able to create Scala classes, is it because of the issues with the error display?

This is a case where the output from the extension would be useful in troubleshooting (#2365)

@bryphe bryphe added the bug Something isn't working label Mar 31, 2021
@zetashift
Copy link

zetashift commented Mar 31, 2021

I'm on Linux, using a recent nightly version.
However even when I'm editing non-Scala files I get an error:

  1. Here I'm just editing some Markdown files:
    image
  2. Here I am in a Nim project:
    image

EDIT: just wanted to say, even with the notifications things still work from what I've tried.
EDIT2: From what I've tried a simple hello-sbt project doesn't notify me of an error either.

@bryphe
Copy link
Member

bryphe commented Apr 1, 2021

Ah, thanks @zetashift ! I'm able to reproduce the error now, too - will help me figure out if it's a 'real' issue, or not.

I believe that, for some reason, this extension is getting activated inappropriately in this case - it shouldn't be running or activated at all in a nim project or a non-sbt project.

@modoodalvi
Copy link
Author

Hi @bryphe, what is interesting: I created a really simple project to make the error message reproducible for you.
However, I don't see the error notification anymore ??? Here is the project setup I use: https://github.com/modoodalvi/scala-test.

@modoodalvi
Copy link
Author

I can also confirm the error message when installing the Nim plugin.

@aldum
Copy link

aldum commented Apr 26, 2021

Hi!

I'd like to provide (an) additional data (point):

  • On Linux, using version 0.5.5
  1. I have a very obviously c++ project, where metals activates:
    https://i.gyazo.com/2b1e4a888a7e750d889c018f5e323a59.png
    (also, the folder did not show up in the explorer after generation, I suspect that's addressed in Sidebar no refresh #3399)
  2. "cannot read property 'includes' of undefined..." - only for Scala 3 projects, which makes sense, I suppose, because it should be handled by a different extension, which is not in openvsx, thus not easily installable in onivim
  3. For Scala 2, this is not a problem, no error message. Completion looks like it's working.
    However, 'Create new Scala file' also doesn't seem to work for me, without any apparent error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-extension Area: Extension/plugin integration, vscode or VimL bug Something isn't working L-scala Language: Scala
Projects
None yet
Development

No branches or pull requests

5 participants