VHDL-LS / rust_hdl

Other
340 stars 65 forks source link

Cross-platform env variable syntax in vhdl_ls.toml #346

Open davidgussler opened 1 week ago

davidgussler commented 1 week ago

I'm requesting that the syntax for environment variables be treated the same way for both Windows and Linux variables so that a vhdl_ls.toml can be checked into version control along with a project and work in any OS without modification.

This is mainly for handling vendor libraries that are installed on a machine, and not directly part of the project. See differences highlighted below:

Windows:

UNISIM.files = [
  '%XILINX_VIVADO%/data/vhdl/src/unisims/unisim_VCOMP.vhd',
]

Linux:

UNISIM.files = [
  '$XILINX_VIVADO/data/vhdl/src/unisims/unisim_VCOMP.vhd',
]

It would be ideal if Windows variables could be handled the same way as Linux variables. Thank you.

Schottkyc137 commented 1 week ago

So the decision to separate windows and unix-like systems was made based on #278. However, I think that there should be a more flexible solution. Probably the best way forward would be to use unix-style substitution (i.e., $VARIABLE), but allow the escape char ($) to be dynamically changeable from some config.