dragos / dragos-vscode-scala

Other
253 stars 39 forks source link

Only start the VSCode extension when a .ensime file exists #47

Closed smarter closed 7 years ago

smarter commented 7 years ago

The extension is useless without it, and this avoids conflicts with other extensions like the Dotty Language Server (which will only start when a .dotty-ide.json file is present after https://github.com/lampepfl/dotty/pull/2777)

smarter commented 7 years ago

Note that this won't cause the extension to be incorrectly used in non-Scala files because of the use of documentSelector in the extension itself: https://github.com/dragos/dragos-vscode-scala/blob/master/scala/src/extension.ts#L64

dragos commented 7 years ago

Actually, I'd like to still hijack the Scala language. Mainly, I want to be able to use the extension on simple projects that have no dependencies (and no Sbt project attached). While it doesn't do it yet, this has been long on my TODO list. How can we make that happen? Is there a way to disable this extension when .dotty-ide.json is present?

smarter commented 7 years ago

Is there a way to disable this extension when .dotty-ide.json is present?

No easy way as far as I can tell: https://code.visualstudio.com/docs/extensionAPI/activation-events

dragos commented 7 years ago

I'll merge this as is until I get to implement support for non-Sbt projects. BTW, what happens when the Dotty extension is also present?

smarter commented 7 years ago

Thanks!

BTW, what happens when the Dotty extension is also present?

When trying to hover over something it seems to get stuck at displaying "Loading.."