Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go to Definition for Macros that are Widgets #84

Open
MinusGix opened this issue Jan 13, 2022 · 0 comments
Open

Go to Definition for Macros that are Widgets #84

MinusGix opened this issue Jan 13, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers sugarcube-2 Relating to the SugarCube-2 Story Format

Comments

@MinusGix
Copy link
Collaborator

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 the macroDef. It might need to be copied over when the macro file is re-read.

@MinusGix MinusGix added enhancement New feature or request good first issue Good for newcomers sugarcube-2 Relating to the SugarCube-2 Story Format labels Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers sugarcube-2 Relating to the SugarCube-2 Story Format
Projects
None yet
Development

No branches or pull requests

1 participant