I have a monaco editor courtesy of this man, and I need to know how to add more advanced lua support to my Monaco editor that is using less-loader.html with a script tag to load the lua language: <script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.47.0/min/vs/basic-languages/lua/lua.min.js"></script>, but when I load in the lua into the editor with the following script:
<script>
monaco.editor.create(document.getElementById('container'), {
value: `function x() {
console.log("Hello world!");
}`,
language: 'lua', //lua is here since I dont have access to luau
theme: 'vs-dark',
});
</script>
<!-- i fixed the syntax -->
But when I set the language to 'lua', it only provides basic, as in minimal highligting, syntax for globals like local, or function, and what I am trying to do is aquire further support for lua, as in luau (The coding language mainly used for roblox). This type of further support would be considered as highlighting similar items, example: I highlight the variable "foo", all other text containing "foo" would have a small, but apparent highlight. Another item for support would be underlines at coding errors (Aka. the red squiggles), and support for certain items like --!nonstrict. Thirdly (and finally), variables would have a seperate color from plaintext (white), comments would be greyed so not to confuse with code, exception being items like --!nonstrict or --!strict, functions/built-ins would be seperatly colored from regular items, such as if then else while true false end and yes, built-ins are (in my opinion) considered items such as wait or :Connect. With all of this, I do not want to implement monaco's IntelliSense feature, since it prevents the up and down arrow keys from altering my position in the code, but instead scroll through the IntelliSense/Hints menu.
My current attempt on jsfiddle is working fine exluding syntax, like how on the original project, Ciro has left a whitespace for the monaco container, something I have fixed with a little styling, and have aquired the lua cdnjs.
But the solution I tried was loading a seperate language (lua), since my thought process was:
Since the loader requires the language javascript, what if I instead include the lua language and load that instead. I thought it would work with some advanced syntax.. Apparently not! instead I have minimal highlighting, no error hints (you know, the red sqiggles) and since I am not that advanced in coding, I have tried googling it alot, and no, I dont have an awnser yet.
-- Your personal worst coder in the world, chrom