-
-
Notifications
You must be signed in to change notification settings - Fork 357
custom luadoc generation #2821
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
custom luadoc generation #2821
Conversation
off topicI noticed your force pushes just now, haha 😂 Here is what I would do if I were in your situation 👀 Actually your original pr contains three commits:
What we want to achieve:squash all 3 as one How to do soHere is one of the way
ps: btw I usually won't use |
Great work, thank you! |
File names in doc.json were broken since LuaLS#2821. See discussion LuaLS#2971.
Section luals.config was implemented in LuaLS#2562, but got lost after a major refactoring in LuaLS#2821. This commit reimplements it. See discussion LuaLS#2963.
File names in doc.json were broken since LuaLS#2821. See discussion LuaLS#2971.
File names in doc.json were broken since LuaLS#2821. See discussion LuaLS#2971.
Section luals.config was implemented in LuaLS#2562, but got lost after a major refactoring in LuaLS#2821. This commit reimplements it. See discussion LuaLS#2963.
Back then the default path of doc.json was LOGPATH. However the default path got lost after a refactoring in LuaLS#2821. This commit reimplements the default path, but changes the default to the current directory.
Back then the default path of doc.json was LOGPATH. However the default path got lost after a refactoring in LuaLS#2821. This commit reimplements the default path, but changes the default to the current directory.
Exposes Lua.docScriptPath as a config value, which should be a path that points to a user's documentation script. This script overrides /script/cli/doc/export.lua , which is used by the server to export docs.
Here is the API, all of which can be overriden by the userscript:
By default Lua.docScriptPath is "" and will execute the default documentation generation script at script/cli/doc/export.lua (with the above specified default behaviors).
For convenience, the script/vm/compiler.lua module now has a function vm.getSimpleClassFields, which can be used to get class fields without them recursing into other classes.
This has only been tested running the server manually with the --doc and --doc_out_path parameters, it has not been tested it by running it in VSC.
I made this because documentation was getting very unwieldy to generate, and saw doc sizes shrink by a factor of 10 when a custom documentation script was applied.
(had a minor crisis using git rebase, had to reset the branch entirely and submit another pr)