29 Commits

Author SHA1 Message Date
btarg
8059ba89c2 Add some useful GDScript snippets for Godot 4 (#794) 2025-02-13 10:57:29 -05: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
EJ
acfcfdbdab feat(snippets): add match statement (#476) 2023-08-27 22:06:41 +02:00
kemgoblin
570e848f03 Add "_unhandled_input" snippet (#422) 2022-09-16 09:57:51 -07:00
kemgoblin
b3f4dda47e Add _physics_process snippet (#411) 2022-08-21 21:40:39 +02:00
Zachary Gardner
4562bf1c31 Fix overaggressive formatting when adding lines after if statement (#385)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-06-17 01:03:00 +02:00
Anton Vakhtel
1d76541f04 Add strict onEnterRules for controlling indentation (#344)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-05-06 17:33:49 +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
Quan
293cc8c1fb Fix "static func" indent error (#279) 2022-03-19 17:32:57 +01:00
Lightning_A
5c5c19b534 Fix typo in snippets: "decleration" -> "declaration" (#262) 2021-03-15 17:12:45 +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
Hugo Locurcio
0742deed36 Remove unused trace_builtins.py script
This closes #191.
2020-06-27 19:31:02 +02:00
Hugo Locurcio
2042b5eb22 Remove extends snippet which no longer works since Godot 3.0
- Remove `set_process(true)`/`set_process_input(true)` snippets
  since these are enabled automatically in Godot 3.0 onwards.
2020-06-04 09:52:09 +02:00
geequlim
b97ba1df4f Add in to keyword list 2020-02-12 18:09:43 +08:00
Jan Haller
555cb1ce9a Fix syntax highlighting for camelCase identifiers
Currently, any occurrences of PascalCase identifiers (even as parts of other words) are recognized as classes.
This assumes snake_case convention for all methods and variables and makes it impossible to use camelCase. While this is the recommended GDScript style, the syntax highlighter should allow for different styles as long as it can do so unambiguously. This is already done for existing rules, but overridden by one rule with an overly general regex pattern.

This commit modifies the catch-all rule for the 'parscal_class' group to only capture whole words.
For clarity, it renames 'parscal_class' to 'pascal_case_class'.

Other groups to recognize classes remain unchanged: type_declear, function-return-type, class_def, class_new, class_is, class_enum, class_name, extends
2019-12-29 18:00:31 +01:00
geequlim
41a58d76b1 Fix indent in GDScript.tmLaguage.json 2019-10-27 12:04:42 +08:00
orenjiakira
f0914742e1 Fix class_name statement bug 2019-10-26 16:07:09 -03:00
geequlim
28e284f0ad Improve code hlighting 2019-10-04 14:15:42 +08:00
pawel duzinkiewicz
7d20df3b35 fix string literal highlighting 2019-10-03 19:58:38 +02:00
Ankit Priyarup
ff7f31776a minor addition in configuration and grammar files
comment folding, addition of new keywords in grammar, removing wrong comments from snippets which was causing problem
2019-05-31 15:13:40 +05:30
geequlim
fafabc3b34 improve syntax highlight of GDScript 2019-05-22 22:20:54 +08:00
geequlim
ece1f3118d Checkout new GDScriptLanguageClient branch 2019-05-04 19:48:36 +08:00
Geequlim
57b6f1ad01 Fix indentations
Add more snippet
2017-08-14 20:47:59 +08:00
Geequlim
0618034ace Fix errors with gdscript language support 2017-08-14 16:41:10 +08:00
Geequlim
b08c61ac8d Add indentation rules support for gdscript 2017-08-10 13:51:49 +08:00
geequlim
90457a0df6 enhanced syntax highlight 2017-08-06 00:36:44 +08:00
geequlim
0f7d4902fd 1. Add enum and match keywords highlight support
2. Shorthand if else support fix #17
3. Fix compains with used variables in array and dictionary fix #18
4. Fix error syntax check with keywords in strings fix #12
5. Add syntax check for end of expression
2017-05-06 23:25:39 +08:00
geequlim
edb733130e Add configuration to ignore indented vairables
Fix hover tip render error with code examples  in documentation
Do not parse any symbols in comments
Remove test files in last commit
2017-02-26 17:05:19 +08:00
Koivulehto
c953f7773d Fixes for gdscript syntax checking (#7)
* Fixed the typo in the folder name configrations

Now the name is configurations. All the code
referencing the folder has also been updated.

* Updated deprecated variables

* Demonstration of current diagnostics issues

All the lines that get a complaint from diagnostics are marked
with #in 0.2.2 and a short explanation whether the complaint is valid
or not.

* Enabled syntax highlighting for comments

Now comments have a different colour compared to variables. Found it
unclear which file controls syntax so edited both
GDScript.full.tmLanguage.json and GDScript.tmLanguage.json. In addition
renamed test_files directory to be clearer and started working on
diagnostic.ts to fix false positives in syntax highglighting.

* Fixed checking comments for syntax

Now comments are not checked for syntax. This was achieved by excluding
comments from being parsed. In addition made it so that syntax check no
longer complains about empty lines having wrong indentation.

* Wrong committer details on previous commits

This commit should have the correct details.

* Added a comment explaining how nextline is parsed

* Reverted changes in symbolparser.ts

Also made minor additions to test_files.
2017-02-26 11:53:35 +08:00