Coding has never been more lit!
preview.mp4
P.S. Press CTRL
+ I
for a quick introduction in the Editor :)
Requirement | Notes |
---|---|
Nerdfont - we use Nerdfont for the file picker. | You'll know it's missing when your icons look like "□" |
Linux - GriddyCode was tested only on Linux | Although it'll work on the Gaming OS, the file picker might not. |
GriddyCode allows you to extend its functionality via Lua.
To open the folder with Lua scripts, go to:
- Windows:
%APPDATA%\Godot\app_userdata\Bussin GriddyCode
- macOS:
~/Library/Application Support/Bussin GriddyCode
- Linux:
~/.local/share/godot/app_userdata/Bussin GriddyCode
Note: the paths are not accurate, we recommend you manually search for GriddyCode in the AppData of your OS.
You may see the folders "langs" and "themes".
- "langs" holds a bunch of
.lua
files that power GriddyCode's syntax highlighting & autocomplete. - "themes" holds a bunch of
.lua
files that change GriddyCode's appearance.
Note: the Lua scripts are reloaded only if you switch from a different file extension (i.e. "README.md" -> "main.ts"), or if GriddyCode is restarted.
To extend the functionality of GriddyCode for a specific file extension, create a file with its name. (i.e. toml.lua
)
Method | Example | Description | Notes |
---|---|---|---|
highlight(keyword: String, color: String) |
highlight("const", "reserved") |
Tells GriddyCode to highlight a certain keyword with a preset of colors. | Available colors: reserved , string , binary , symbol , variable , operator , comments , error , function , member |
highlight_region(start: String, end: String, color: String, line_only: bool = false) |
highlight("/*", "*/", "comments", false) |
Tells GriddyCode to highlight a region with a preset of colors. | The start must be a symbol. Due to Godot's limited functionality, you can't use RegEx. |
add_comment(comment: String) |
add_comment("What is blud doing 🗣️🗣️🗣️") |
Adds a comment to be randomly chosen in the CTRL + L menu. |
The username, profile picture, date, and likes are chosen by GriddyCode. |
detect_functions(content: String) -> Array[String] |
detect_functions("const test = 3; function main() {}; async init() => { main() }") |
Called by GriddyCode upon input. Results are showed in the autocomplete feature. | This must be provided by the Lua script. It must return an array of strings (i.e. ["main", "init"]). |
detect_variables(content: String) -> Array[String] |
detect_variables("const test = 3;") |
Called by GriddyCode upon input. Results are showed in the autocomplete feature. | This must be provided by the Lua script. It must return an array of strings (i.e. ["test"]). |
Note: to provide reserved variables/functions (i.e. Math
/parseInt()
in JS) you can have them already set up in the array you return. GriddyCode will handle the rest!
To add a theme, create a file in the "themes" folder with any name. (i.e. "dracula.lua"). You will be able to choose it within GriddyCode.
Method | Example | Description | Notes |
---|---|---|---|
set_keywords(property: String, new_color: String) |
set_keywords("reserved", "#ff00ff") |
Set the color of syntax highlighting. | The second argument must be a hex, # being optional. Available colors/properties listed above at langs . |
set_gui(property: String, new_color: String) |
set_gui("background_color", "#ff00ff") |
This method is dedicated to the overall GUI aspect of GriddyCode. | Available properties: background_color , current_line_color , selection_color , font_color , word_highlighted_color , selection_background_color . Properties except background_color , if not provided, will be set to a slightly modified version of background_color . Although possible, we don't recommend you rely on those & instead set all the values. |
Note: if the HEX you input is invalid, it will default to #ff0000 (red)
If you want to use a theme/plugin for yourself, you can put it into your AppData.
If you want to submit a theme/plugin, open a pull request adding it to Lua/Plugins
or Lua/Themes
respectively. If merged, it will be included in the next build.
Contributions are heavily appreciated, whether it's for adding Lua plugins, themes, safely exposing more features to Lua, or adding features directly to GriddyCode!
- You will need to install the Godot Engine to run your proposed change & make sure it runs flawlessly.
- You don't have to submit executables.
- Use the v4.2 of the engine (currently Latest)
- The
VHS & CRT
shader, on certain themes (One Dark Pro, GitHub Light, etc.), becomes completely white. Works good on GitHub Dark; - Light modes get affected by glow, while dark modes seem fine.
- An option in the settings menu (
CTRL
+,
) to change the font; - The current limit for lines is ~1600. If the cursor moves past that amount, the
CodeEdit
node will activate its scrolling, making the camera bug & go out of view. A limit should be implemented so that the camera won't go out of screen.
- Making the cat jumping video in the settings menu fade in/out along the actual menu. Currently it ignores the transition;
CTRL
+P
to open a quick file picker, similar to VSCode.- Selecting a setting with the property "shader" should disable previously-enabled settings with "shader".
- The
CheckButton
node for eachsetting
scene doesn't change with the theme. This affects light themes specifically.