46 Commits

Author SHA1 Message Date
Oasin Lyu
9d7187970a Recognize pascal-case identifiers that ends with 2 or more upper case letters as pascal_case_class (#908)
Co-authored-by: Seth <seth_lyu@aoki7studio.com>
2025-08-20 15:33:15 -04:00
Danil Alexeev
45db62bfa3 Update GDScript syntax highlighter (#877) 2025-06-29 13:29:35 -04:00
Asaf Shilo
911a34fda4 Fix GDScript Syntax Highlighting for "self" Keyword (#846)
* Rewrite rules for highlighting "self"

---------

Co-authored-by: David Kincaid <daelonsuzuka@gmail.com>
2025-04-26 16:00:15 -04:00
David Kincaid
0203cec293 Formatting and Highlighting Fixes (#812)
Fixes #805 and #810
2025-03-04 18:56:21 -05:00
Arron
0a3c319879 Add region blocks as a language scope for themes (#800) 2025-02-22 13:46:32 -05:00
David Kincaid
3f7a944e96 More Highlighting and Formatting Improvements (#783)
* Fix **= operator being formatted incorrectly

* Fix variables in get_node()-style function calls not being highlighted

* Move super from builtin_classes to keywords

* Fix uppercase builtin classes being highlighted as constants

* Fix setter and getter highlighting/formatting

* Fix variable as default parameter not highlighted in function declaration
2025-02-22 12:51:44 -05:00
David Kincaid
aee83dd2a4 Update float syntax rules and formatting (#756)
* Update float syntax rules and formatting

* Add missing export_group annotation

* Moved abstract from an annotation to a keyword

* Add an example of the other type of string interpolation.
2024-12-18 10:45:05 -05:00
David Kincaid
f648c37353 Various Formatter Improvements (#746)
* add new style of formatter snapshot tests
* add many new test cases
* fix several open issues( #728, #624, #657, #717, #734, likely more)
2024-11-18 11:16:16 -05:00
Hugo Locurcio
c33982d38e Remove OS, GDScript and Object from the list of builtins in syntax highlighting (#739) 2024-10-21 09:03:45 -04:00
ProgramGamer
43bb36ca30 Fixed the textmate grammar erroneously tagging enum members and const variables as language constants (#737) 2024-10-19 14:40:23 -04:00
Hugo Locurcio
96510971f4 Add @static_unload annotation and Godot 4.3 Variant types to syntax highlighting (#738) 2024-10-19 14:39:34 -04:00
David Kincaid
5b725b55fd Fix bare nodepaths referencing absolute/root paths (#712) 2024-09-15 16:04:31 -04:00
Patrick Werner
bc89f274d5 Add @export_custom and @export_storage to syntax highlighting (#702)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2024-09-02 23:59:43 +02:00
David Kincaid
9750f8dfc6 Fix various syntax highlighting issues (#674)
* Fix variable declaration highlighting

* Clean up function call highlighting
2024-07-02 14:04:22 -04:00
David Kincaid
cca25099c4 More Formatter Fixes (#672)
* Fix nodepath function highlighting/tokenization

* Reverted dangerous line removal behavior change

* Fix detection of match keyword vs .match() function

* Rearrange formatter options

* Fix option default value

* Add biome linter/formatter config file

* Fix linter errors

* Add system to supply custom config values in tests

* Remove unused variable

* Implement tests for both formatter options

* Clean up formatter option handling

* Fix extra space inserted in list of nodepaths

* Add token rules for square and curly braces
2024-06-29 16:08:24 -04:00
David Kincaid
c07fe37f30 Fix bad formatting on several operators (#605)
Many, many formatter and syntax highlighting improvements.
2024-06-24 16:48:44 -04:00
David Kincaid
0c9c2554fb Syntax highlighting fixes (#593) 2024-02-21 12:07:05 -08:00
Daelon Suzuka
34916becd6 Various highlighting/formatting fixes (#559)
* Fix constant attribute access highlighting
* Fix line endings breaking the snapshot tests
* Fix nodepath shorthand formatting
2024-01-02 00:02:30 -08:00
Sandy Gutierrez
0a794ebc1b Add snapshot tests to formatter (#545)
* Add snapshot tests for formatter
* Add test runner to CI

---------

Co-authored-by: David Kincaid <daelonsuzuka@gmail.com>
2023-12-22 03:04:02 -08:00
Daelon Suzuka
e7e2d0439d Various QoL Improvements (#529)
* Updated Godot icons (and removed old ones)
* Improve "Debug Pinned Scene" command by making the pinned scene persist between VSCode sessions
* Fix scene file highlighting not working 
* Fix ScenePreview not working in Godot 3
* Add buttons for relevant actions to ScenePreview items
* Add internal document links for SubResource() and ExtResource() statements in scene files
* Add hover for SubResource() and ExtResource() statements in scene files
* Improve ability to right click -> open docs for methods of builtin types (doesn't always work)
* Add a file decorator to show the pinned debug file in the filesystem view/editor tabs
* Add item decorators to the Scene Preview to show Node attributes more clearly
* Updated readme
* Overhauled documentation viewer
* Added GDScript formatter
* Add (disabled) experimental providers for custom completions, semantic tokens, and tasks
* Lots of internal refactoring
2023-12-06 06:53:10 -08:00
Daelon Suzuka
a4c1181894 Rewrite debugger for Godot 4 support + improved maintainability (#452)
* Significantly rework the debugger to add Godot 4 support.

* Simplify debugger internal message handling and shorten code paths, to enable easier maintenance in the future.

* Streamline debugger configs: almost all fields are now optional, and the debugger should work out-of-the-box in a wider set of situations.

* Add guardrails, error handling, and input prompts to help guide the user to correct usage/configuration.

* Add the following commands:
  *  godotTools.debugger.debugCurrentFile
  *  godotTools.debugger.debugPinnedFile
  *  godotTools.debugger.pinFile
  *  godotTools.debugger.unpinFile
  *  godotTools.debugger.openPinnedFile

---------

Co-authored-by: RedMser <redmser.jj2@gmail.com>
Co-authored-by: Zachary Gardner <30502195+ZachIsAGardner@users.noreply.github.com>
2023-11-12 07:46:44 -08:00
Ryan Brue
dcbfcb4b4b Syntax highlighting changes (#515)
Better syntax highlighting for properties. Class variables used to be unhighlighted and are now highlighted properly as `variable.other.gdscript`, properties are still highlighted as `variable.other.property.gdscript`
2023-10-21 21:59:20 -04:00
Daelon Suzuka
5bfe853f8c Multiple highlighting improvements (#506)
* binary int notation
* `_` spacers in numeric literals
* fixed several instances of incorrect case insensitivity
* @"a", &"b", ^"c", and r"d" style string literals
2023-10-13 01:06:25 -04:00
Daelon Suzuka
df386efa54 Add Godot 4 support to the Scene preview panel (#451) 2023-03-14 18:13:32 +01:00
Daelon Suzuka
3ce256379f Fix various syntax highlighting problems (#441) 2023-03-14 18:10:54 +01:00
Daelon Suzuka
5a67e4c78d Fix errors in grammar syntax (#416) 2022-10-26 01:47:31 +02:00
Daelon Suzuka
fb82ef69e5 Fix incorrect highlighting in dictionary literals (#419) 2022-09-09 17:59:58 +02:00
Daelon Suzuka
441873eb6d Fix internal document link handling (#410)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-08-22 02:13:01 +02:00
Daelon Suzuka
dfe23195eb Fix various highlighting errors (#407)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-08-21 21:46:41 +02:00
Daelon Suzuka
ef450cad38 Fix OS singleton being incorrectly highlighted as a constant (#402) 2022-08-07 08:09:09 +02:00
Daelon Suzuka
ec95c21b84 Add highlighting support for %Unique nodes in NodePaths (#403)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-08-06 09:07:31 +02:00
Daelon Suzuka
6dc5a8293f Update gdshader syntax (#397)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-08-06 08:52:59 +02:00
Daelon Suzuka
868ec5116f Fix func keyword highlighting (#398) 2022-07-23 02:31:31 +02:00
Daelon Suzuka
e539a4e7a9 Replace temporary .gdshader syntax with more extensive support (#360) 2022-07-21 00:09:16 +02:00
oidro
94e5a9e95d Fix operator syntax highlighting when next to an opening parenthesis (#375) 2022-06-02 23:37:33 +02:00
Daelon Suzuka
fb96098c70 Fix keywords being incorrectly highlighted as function calls (#353) 2022-04-28 01:16:44 +02:00
Daelon Suzuka
2cfbed2dad Fix syntax highlighting edge cases (#350)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-04-22 15:35:36 +02:00
Daelon Suzuka
5e0d108953 Add missing NodePath-using functions (#348) 2022-04-18 23:37:06 +02:00
Daelon Suzuka
78e37e8016 Overhaul syntax highlighting (#342)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-04-11 18:33:16 +02:00
Adam Chyb
854ec42027 Fix some $ node path shorthand regex bugs in syntax highlighting (#340) 2022-04-05 16:57:49 +02:00
oidro
ee80ea914b Improve syntax highlighting (#330)
This pull request makes the syntax highlighting of GDScript more closely match
the built-in Godot editor's, as well as VSCode's Python syntax highlighting.
2022-03-19 17:02:10 +01:00
Vlad-Zumer
29f1bc0ceb Change $ node path shorthand regex to match only valid paths (#276)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-06-15 18:39:29 +02:00
Vlad-Zumer
338b6ae977 Added 'in' to the list of keywords and added rule for $ shorthand (#274) 2021-06-14 00:23:46 +02:00
iammrtndev
f2a6288276 Add "remote" keyword for highlighting (#257)
"remote" is currently not highlighted. https://imgur.com/WkP9STd
2021-02-07 16:57:48 +01:00
Nils "Linkpy" Reid
e60d081927 Fixed the syntax of the escaped characters in strings (#247) 2020-10-28 15:16:03 +01:00
Francois Belair
3a112f2f79 Move grammar from configurations to syntaxes directory (#228)
This enables Github's linguist to pick up on an up to date GDScript
 grammar file and better highlight GDScript files on Github without
impacting the extension's functions.
2020-09-08 16:43:15 +02:00