Go to Definition for Macros that are Widgets #84
Labels
enhancement
New feature or request
good first issue
Good for newcomers
sugarcube-2
Relating to the SugarCube-2 Story Format
It would be entirely possible to recognize the definitions for macros in widget tagged passages, so then one can use the typical F12 / 'Go to Definition' commands to, well, go to where they're defined.
It would probably be a relatively simple matter of checking (perhaps in
updateDiagnostics
? or add a function that is called in many of the same times?) if the macro is the<<widget>>
macro, getting the name of it, checking if that is in the definitions, and adding that as a runtime-computed field to themacroDef
. It might need to be copied over when the macro file is re-read.The text was updated successfully, but these errors were encountered: