[BUG] File paths with $ are incorrectly being interpreted as environment variables
Matt-D-Smith opened this issue · comments
Matthew Smith commented
If a file path has a '$' character in it, the parser for vhdl_ls.toml interprets it as an environment variable when it should not. $ characters are valid in windows file path names, and used in network/shared file paths to indicate hidden folders.
Example entry in vhdl_ls.toml
unisim.files = [
'\\networklocation\cad$\apps\xilinx_vitis\Vivado_2020.2\Vivado\2020.2\data\vhdl\src\unisims\unisim_VCOMP.vhd',
]
Resulting error in VHDL LS output:
Error loading vhdl_ls.toml: environment variable '' is not defined
Lukas Scheller commented
This is fixed with the latest commit by disabling the substitution feature for windows machines. However the current solution is unsatisfactory as windows users would likely also want to have this feature, probably using the %VAR_NAME%
syntax instead of the $VAR_NAME
syntax. I have opened an issue on the subst
package addressing this.
Mark Brett commented
Yes I'm quite disappointed by that change - the variable substitution feature was fantastic for us and we're on Windows.
Perhaps an alternative would be to have a setting to enable or disable the substitution?