Closed Juraci closed 2 years ago
Update, I think I figured it out. The way you start vs-code matters, at least in my case.
Starting vs-code from a launcher like dmenu or rofi by typing code
causes the problems described in my issue.
If I instead open vs-code in the terminal by:
cd /home/juraci/personal/wy-cash-tdd
code .
(to open vscode with the current project)Then vscode-ruby work as expected with rubocop higllights and reek suggestions.
Looks like vs-code inherits the environment where it was initiated, so launching the vs-code process from the terminal with the login shell it "just works". Launching from dmenu or rofi it doesn't.
It could be related to the shell that is used to run subprocesses. I recently stumbled upon a similar issue in https://github.com/castwide/vscode-solargraph/issues/238 , where it uses the system default shell (zsh
) to run subprocesses, but the setup for my Ruby environment is in the init files of bash
(because that’s the shell I use personally). And, as mentioned in the original issue, starting VSCode from the terminal makes it work, because then it inherits ENV["SHELL"]
which is set to bash
.
This issue has not had activity for 30 days. It will be automatically closed in 30 days.
Your environment
vscode-ruby
version: v0.28.0useLanguageServer
is true in your configuration?): yesExpected behavior
this should work from inside the editor
Actual behavior
Executing the same commands manually in the terminal against the same file does work: rubocop
reek
my settings file: