-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
Custom metadata and defines (documentation, completion) #10858
Custom metadata and defines (documentation, completion) #10858
Conversation
Haven't checked the code, so maybe you already did this, but: There should probably be some flag in the display API to tell apart custom defines / metas from built-in ones, so the editor can choose to render them a bit differently. Actually, even better, maybe some kind of |
This reverts commit 94179f3.
34a8b1d
to
8eb1278
Compare
User defined source can still be called 'source' I guess?
79f7a1c
to
82814a9
Compare
Thank you, and good job! This is a really neat addition. |
See #10844
Note: can also make use of HaxeFoundation/haxelib#573 so that libs can declare files similar to our own
meta.json
/define.json
files directly in theirhaxelib.json
.Allows user (and mostly libs) to declare their custom medatada and defines in a similar way as we do with
meta.json
anddefine.json
, so that editors can provide completion / documentation for those.Adds 4
haxe.macro.Compiler
endpoints:registerMetadataDescriptionFile
to register a file similar tometa.json
registerDefinesDescriptionFile
to register a file similar todefine.json
registerCustomMetadata
to add documentation about a single custom metadataregisterCustomDefine
to add documentation about a single custom defineAdds two haxe compiler arguments:
--help-user-metas
to display user-defined metadata documentation for current compilation context--help-user-defines
to display user-defined defines documentation for current compilation contextExample usage (with partial documentation; can also use a build.hxml file and grab documentation from libs):
There are likely things that could be written in a better way, have a better name, etc.
Please give some feedback :)