ruby-lsp
ruby-lsp copied to clipboard
vs code: asdf environment variables ignored
Description
VS Code Ruby LSP
The extension detects asdf
but fails when searching for the data directory.
The code does not appear to use the asdf environment variables:
-
ASDF_DIR
-
ASDF_DATA_DIR
Instead, it attempts to detect those values by looking at predetermined locations. This fails when a those values are set to alternative locations.
Reproduction steps
- set
ASDF_DATA_DIR
to ~/asdf-data - install/setup asdf to that location (see docs)
- Open VS Code
- Open a Ruby file
- See error:
Automatic Ruby environment activation with asdf failed:
Could not find ASDF data dir. Searched in
file:///Users/zach.gianos/.asdf,
file:///opt/asdf-vm,
file:///opt/homebrew/opt/asdf/libexec,
file:///usr/local/opt/asdf/libexec
Note
A recent update broke this customization of the asdf
setup.
I presume that it was this commit: 30bc0001.
I'm simply comparing the timeframe of the commit and the functionality change. (I use Ruby LSP every day.)