You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,11 +59,11 @@ To extend the functionality of GriddyCode for a specific **file extension**, cre
59
59
60
60
| Method | Example | Description | Notes |
61
61
| -------- | -------- | -------- | -------- |
62
-
|`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`|
62
+
|`highlight(keyword: String, color: String)`|`highlight("const", "reserved")`| Tells GriddyCode to highlight a certain keyword with a preset of colors. | Available colors: `reserved`, `annotation`, `string`, `binary`, `symbol`, `variable`, `operator`, `comments`, `error`, `function`, `member`|
63
63
|`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. |
64
64
|`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. |
65
-
|`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"]). |
66
-
|`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"]). |
65
+
|`detect_functions(content: String, line: int, column: int) -> 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"]). "line" and "column" are the position of the cursor when the autocomplete was requested. |
66
+
|`detect_variables(content: String, line: int, column: int) -> 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"]). "line" and "column" are the position of the cursor when the autocomplete was requested. |
67
67
68
68
*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!*
0 commit comments