undermywheel / vscode-luau Goto Github PK
View Code? Open in Web Editor NEWRoblox Luau extension for Visual Studio Code
License: MIT License
Roblox Luau extension for Visual Studio Code
License: MIT License
In my color theme (Atom One Dark), this would greatly help discern between keywords and library functions:
Lua | Luau |
---|---|
Some color themes are better at making this difference noticeable, like default Dark+:
Lua | Luau |
---|---|
And some others are not, like Material Darker:
Lua | Luau |
---|---|
or VS Dark:
Lua | Luau |
---|---|
I wrote this in consideration of the vscode repository's existing Lua syntax highlighter (L234-237):
{
"match": "(?<![^.]\\.|:)\\b(coroutine\\.(create|resume|running|status|wrap|yield)|string\\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\\.(concat|insert|maxn|remove|sort)|math\\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|sinh?|sqrt|tanh?)|io\\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\\.(cpath|loaded|loadlib|path|preload|seeall)|debug\\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|traceback))\\b(?=\\s*(?:[({\"']|\\[\\[))",
"name": "support.function.library.lua"
},
It would also help to use constant highlighting for math.pi
and math.huge
like vscode repo does (L222-225), or just remove it altogether:
{
"match": "(?<![^.]\\.|:)\\b(false|nil|true|_G|_VERSION|math\\.(pi|huge))\\b|(?<![.])\\.{3}(?!\\.)",
"name": "constant.language.lua"
},
Although I would probably make the name of those two constant patterns support.constant.luau
.
This extension uses a special language id (luau) in the package.json contributions instead of the normal "lua" language id that other extensions use, such as the VSCode extension for Selene. This make the extension incompatible with Selene for linting.
It's only a simple macro and will help a lot with workflow and efficiency.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.