With lua addons one can create rewrites in the lua language server.
Meaning, for the language server we can rewrite @require to require, which will then properly fill the intellisense data.
For the script compilation however we can make a distinction between the @require which we will replace with in-line references.
Which will keep the require calls to exist. Which makes it so that if one does want to use require in DCS, which is possible if that function is not removed/sanitized in MissionScripting.lua, they can.
It will break current scripts.
It will also possibly cause confusion as require will be valid according to the LUALS however, it will not actually resolve anything if it's a local transpiled file reference.
Another option might be to have a _require that will also rewrite in the LUALS, but it will then be rewritten to require in the transpilation, leaving require
With lua `addons` one can create rewrites in the lua language server.
Meaning, for the language server we can rewrite `@require` to `require`, which will then properly fill the intellisense data.
For the script compilation however we can make a distinction between the `@require` which we will replace with in-line references.
Which will keep the `require` calls to exist. Which makes it so that if one does want to use `require` in DCS, which is possible if that function is not removed/sanitized in `MissionScripting.lua`, they can.
It will break current scripts.
It will also possibly cause confusion as `require` will be valid according to the LUALS however, it will not actually resolve anything if it's a local transpiled file reference.
Another option might be to have a `_require` that will also rewrite in the LUALS, but it will then be rewritten to `require` in the transpilation, leaving `require`
Which will mark it as "unknown" unless marked as "globalRequirable".
Otherwise it will mark it when the file reference does not exist.
Instead of this we'd go the LuaLS route.
Which will mark it as "unknown" unless marked as "globalRequirable".
Otherwise it will mark it when the file reference does not exist.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
With lua
addonsone can create rewrites in the lua language server.Meaning, for the language server we can rewrite
@requiretorequire, which will then properly fill the intellisense data.For the script compilation however we can make a distinction between the
@requirewhich we will replace with in-line references.Which will keep the
requirecalls to exist. Which makes it so that if one does want to userequirein DCS, which is possible if that function is not removed/sanitized inMissionScripting.lua, they can.It will break current scripts.
It will also possibly cause confusion as
requirewill be valid according to the LUALS however, it will not actually resolve anything if it's a local transpiled file reference.Another option might be to have a
_requirethat will also rewrite in the LUALS, but it will then be rewritten torequirein the transpilation, leavingrequireInstead of this we'd go the LuaLS route.
Which will mark it as "unknown" unless marked as "globalRequirable".
Otherwise it will mark it when the file reference does not exist.