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 ${workspaceFolderBasename} in settings #713

Open
MarximusMaximus opened this issue Aug 28, 2022 · 3 comments
Open

Support ${workspaceFolderBasename} in settings #713

MarximusMaximus opened this issue Aug 28, 2022 · 3 comments

Comments

@MarximusMaximus
Copy link

Set shellcheck.executablePath to a path such as "/opt/conda/miniforge/envs/${workspaceFolderBasename}/bin/shellcheck" where "${workspaceFolderBasename}" works out to "batteries-forking-included".

Reload VSCode.

Error displays:
The shellcheck program was not found (not installed?). Use the 'shellcheck.executablePath' setting to configure the location of 'shellcheck'

Set "/opt/conda/miniforge/envs/batteries-forking-included/bin/shellcheck".

Reload VSCode.

No error.

@felipecrs
Copy link
Collaborator

Thanks for the feature request. This should be easy to implement. PRs are welcome too.

@felipecrs felipecrs changed the title shellcheck.executablePath does not support VSCode settings variables, e.g. ${workspaceFolderBasename} Support ${workspaceFolderBasename} in settings Aug 30, 2022
@felipecrs
Copy link
Collaborator

Currently we only support ${workspaceFolder}:

.replace(/\${workspaceFolder}/g, workspaceFolder || "");

Because, unfortunately, support for each of these variables has to be implemented manually since the following feature request wasn't yet implemented in VS Code:

One alternative is to use https://github.com/DominicVonk/vscode-variables, but it seems to be a little outdated.

@felipecrs
Copy link
Collaborator

PRs are welcome, btw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants