Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

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

Merged
merged 1 commit into from
Jun 20, 2017

Conversation

smarter
Copy link
Contributor

@smarter smarter commented Jun 17, 2017

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
scala/scala3#2777)

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
scala/scala3#2777)
@smarter
Copy link
Contributor Author

smarter commented Jun 17, 2017

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
Copy link
Owner

dragos commented Jun 19, 2017

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
Copy link
Contributor Author

smarter commented Jun 19, 2017

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
Copy link
Owner

dragos commented Jun 20, 2017

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?

@dragos dragos merged commit 64727c0 into dragos:master Jun 20, 2017
@smarter
Copy link
Contributor Author

smarter commented Jun 20, 2017

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.."

jc776 pushed a commit to jc776/dragos-vscode-scala that referenced this pull request Jun 20, 2017
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
scala/scala3#2777)
fede0664 pushed a commit to fede0664/dragos-vscode-scala that referenced this pull request Sep 9, 2017
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
scala/scala3#2777)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants