Last active
December 9, 2022 03:37
-
-
Save TTTPOB/6d59c27794b4d0ffeb7942f36a6cf9e7 to your computer and use it in GitHub Desktop.
a hack let [vscode-R](https://github.com/REditorSupport/vscode-R) works with nix-shell, see https://github.com/REditorSupport/vscode-R/issues/831
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# save this script somewhere and invoke it in shell.nix shellHook | |
# it will read current r and radian path and write it to vscode | |
# workspace settings | |
# jq required | |
settings=.vscode/settings.json | |
mkdir -p .vscode | |
echo '{}' > $settings | |
rpath_exsits=$(cat $settings|jq '."r.rpath.linux"') | |
rterm_exsits=$(cat $settings|jq '."r.rterm.linux"') | |
not_exsist="null" | |
rpath=$(which R) | |
rterm=$(which radian) | |
cat $settings | | |
jq '."r.rpath.linux"='\"$rpath\" | tee $settings | |
cat $settings | | |
jq '."r.rterm.linux"='\"$rterm\" | tee $settings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @TTTPOB , is this workaround still your preferred solution?
Can't tell if the issue has been otherwise resolved.