Auto-generate .vhdl_ls.toml for VS Code VHDL LS from OSVVM build flow#73
Auto-generate .vhdl_ls.toml for VS Code VHDL LS from OSVVM build flow#73BekdoucheAmine wants to merge 2 commits intoOSVVM:devfrom
.vhdl_ls.toml for VS Code VHDL LS from OSVVM build flow#73Conversation
|
A variable can be added to the |
|
You are moving faster than I am. I have browsed your pull request and hope to do a full review this weekend. Here is my browsing level review.
For either of the suggestions above to work, you have to create the fiinal Toml file when the build finishes. Luckily this is easy (thanks to Issues from Markus Ferringer). Simply overload the default CallbackAfter_Build. The default is in CallbackDefaults.tcl. You would add the following to your VendorScripts_*.tcl file. A user can add your proposed variable, perhaps TomlTargetDirectory, to their OsvvmScriptsLocal. When the scripts are run, if that TomlTargetDirectory exists, they can use it, otherwise use the CurrentSimulationDirectory. For information on OsvvmScriptsLocal.tcl see OSVVM Settings User Guide. If there is no variable defining TomlTargetDirectory, a user can Initially I did not like the support stuff for toml files being in VendorScripts_*.tcl, but it is growing on me - I suspect it probably belongs there. The current working library for OSVVM (set by the library command) is in the variable ::osvvm::VhdlWorkingLibrary. For now, GenerateVhdlLsToml should be in OsvvmScriptsCore.tcl - just before the exports - rather than in StartUp.tcl (as no subprograms go in there). Since this is in the OSVVM context, an export (see bottom of file) will be needed. If you like, I can do this after the doing the pull request. Note it move again at a later date when OsvvmScriptsCore gets refactored. |
Description
This PR introduces a TCL-based solution to automatically generate the VS Code VHDL Language Server configuration file (
.vhdl_ls.toml) directly from the OSVVM build process.Implementation
Scripts/VendorScripts_GenerateVhdlLsToml.tclScripts/StartUp.tclvendor_analyze_vhdl)buildflow.vhdl_ls.tomlgrouped by[libraries.<name>]in the user workspaceUsage
source ../OsvvmLibraries/Scripts/StartUp.tcl GenerateVhdlLsToml ../OsvvmLibrariesThis will:
Notes
.tomllibrary configuration from OSVVM.profiles #72 and builds on the existing VendorScripts_CompileList.tcl methodology.