laughedelic / atom-ide-scala

:atom: Scala & Dotty support for Atom IDE (🧟‍♂️ zombie repo)
https://atom.io/packages/ide-scala
MIT License
48 stars 10 forks source link

Notify scalafmt failures #59

Closed cquiroz closed 5 years ago

cquiroz commented 6 years ago

When scalafmt fails there is no notification and the tooltip doesn't disappear

gmoscontrollerepics scala projects ocs3 2018-04-15 11-15-13
laughedelic commented 6 years ago

Do you run formatting while Metals is still initialising? I'm not sure what I can do about that from here. I think this should be fixed either in atom-languageclient or in atom-ide-ui. It should just ignore formatting request until the server is initialised.

cquiroz commented 6 years ago

This happened later on. i pressed the shortcut for formatting and you can see the error in the log but there is no indication on the UI

laughedelic commented 6 years ago

Could you post the failure log? Why does it fail at all?

cquiroz commented 6 years ago

The scala file is to complex and scalfmt files. That's unrelated to the plugin of course

Scalafmt210:58 Failed to format file file:///Users/cquiroz/Projects/ocs3/modules/edu.gemini.seqexec.model/src/main/scala/edu/gemini/seqexec/model/events.scala. Cause: Search state exploded around line 26.
00:14:42.773 INFO  s.m.m.s.InMemorySymbolIndex - resolveName at Uri(file:///Users/cquiroz/Projects/ocs3/modules/edu.gemini.seqexec.model/src/main/scala/edu/gemini/seqexec/model/events.scala):20:47
00:14:42.892 INFO  s.m.m.p.DocumentHighlightProvider$ - Document highlight in Uri(file:///Users/cquiroz/Projects/ocs3/modules/edu.gemini.seqexec.model/src/main/scala/edu/gemini/seqexec/model/events.scala
laughedelic commented 6 years ago

I see. I think it's Metals fault then: it just swallows that error instead of returning a proper error LSP response. Could you open an issue in Metals?