Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
I initially wanted to get rid of
isTesting()
entirely an only rely onide.runMode === "test"
andide.runMode === "production"
but it seems that some tests actually don't run as vscode extensions we need theCURSORLESS_TEST
environment variable (seelaunch.json
)I thought about moving the
isTesting()
tocursorless-engine
since it holds the ide and export that specific function to the rest of the world. However there is at least one instance ofisTesting()
in a package that doesn't importcursorless-engine
(packages\cursorless-vscode\src\ide\vscode\VscodeEnabledHatStyleManager.ts
) so we can't do that.That is why I came up with this following approach, even though I'm not entirely happy about it. I can't think about any better way, but at least I think it's better than the current way.
it is all the more not ideal because for neovim I'm using
CURSORLESS_MODE
set todevelopment
ortest
to set theneovimIde.runMode
since it's not given by vscode. consequently I'm never gonna useisTesting()
. Consequently we could potentially move this one to vscode specific packages.