Commit graph

310 commits

Author SHA1 Message Date
Yuri Sizov
5c99558d16 Merge pull request #76591 from HolonProduction/complete-tween
Autocomplete properties in `tween_property`
2023-12-14 17:37:53 +01:00
HolonProduction
5f72254d4d Fix regression when autocompleting subscript on get node 2023-12-13 10:54:40 +01:00
Rémi Verschelde
7c8dfea9e3
Merge pull request #85196 from HolonProduction/completion-filter-groups
Filter groups and categories from autocompletion
2023-12-05 13:05:18 +01:00
HolonProduction
c8889a7fe7 Improve autocompletion with get_node 2023-12-04 17:06:46 +01:00
HolonProduction
e253250814 Filter groups and categories from autocompletion 2023-12-04 15:48:29 +01:00
Rémi Verschelde
fa259a77cd
Codestyle: Fix some comment issues 2023-11-21 15:26:53 +01:00
HolonProduction
4883a12a13 Autocomplete properties in tween_property 2023-11-19 22:18:06 +01:00
Danil Alexeev
496bee3bc7
GDScript: Add autocompletion for static variables accessed via class 2023-10-11 17:10:16 +03:00
Danil Alexeev
de7cbe8789
Highlight doc comments in a different color 2023-10-08 19:26:10 +03:00
Danil Alexeev
6767de9b69
GDScript: Fix native_type is empty for autoload without script 2023-10-04 16:09:18 +03:00
Danil Alexeev
e750c59cf8
GDScript: Improve highlighting of types 2023-10-03 17:32:27 +03:00
Rémi Verschelde
1a0e653d7f
Merge pull request #78573 from dalexeev/editor-create-script-class-name
Editor: Remove unused Class Name field from Create Script dialog
2023-09-25 17:17:46 +02:00
Rémi Verschelde
21b132616b
Merge pull request #74995 from dalexeev/gds-r-strings
GDScript: Add raw string literals (r-strings)
2023-09-20 13:09:13 +02:00
Rémi Verschelde
c63e0aefcf
Merge pull request #79366 from dalexeev/gds-signal-info-and-callback
Editor: Improve signal callback generation
2023-09-17 14:45:47 +02:00
Danil Alexeev
26ce861910
Editor: Remove unused Class Name field from Create Script dialog 2023-09-12 12:49:56 +03:00
Danil Alexeev
4b5daf06ef
Editor: Improve signal callback generation 2023-09-11 18:45:39 +03:00
Danil Alexeev
2964c7d51c
GDScript: Add raw string literals (r-strings) 2023-09-11 18:34:33 +03:00
BooksBaum
0202a36a7a Language Server: Improve hovered symbol resolution, fix renaming bugs, implement reference lookup
Co-Authored-By: Ryan Brue <56272643+ryanabx@users.noreply.github.com>
Co-Authored-By: BooksBaum <15612932+booksbaum@users.noreply.github.com>
2023-09-11 09:46:34 -05:00
Yuri Rubinsky
35802374ac Add coloring for completion of vector components 2023-08-30 21:13:25 +03:00
ajreckof
4b724c9252 Fix completion option location not found 2023-08-05 02:15:45 +02:00
Yuri Sizov
68a49c4959 Merge pull request #79935 from dalexeev/gds-validate-node-path-annotation
GDScript: Add validation for `@export_node_path` annotation arguments
2023-08-01 17:25:44 +02:00
Yuri Sizov
3de7dd902c Merge pull request #79880 from dalexeev/gds-fix-id-shadowing-below
GDScript: Fix bug with identifier shadowed below in current scope
2023-07-31 21:01:36 +02:00
Danil Alexeev
5b4403c9a5
GDScript: Add validation for @export_node_path annotation arguments
Co-authored-by: George Marques <george@gmarqu.es>
2023-07-26 20:36:47 +03:00
Juan Linietsky
5e512b705e Support threads in the script debugger
* This implementation adds threads on the side of the client (script debugger).
* Some functions of the debugger are optimized.
* The profile is also now thread safe using atomics.
* The editor can switch between multiple threads when debugging.

This PR adds threaded support for the script language debugger. Every thread has its own thread local data and it will connect to the debugger using multiple thread IDs.
This means that, now, the editor can receive multiple threads entering debug mode at the same time.
2023-07-26 12:06:45 +02:00
Danil Alexeev
d53fc92b4c
GDScript: Fix bug with identifier shadowed below in current scope 2023-07-26 11:26:57 +03:00
Yuri Sizov
74d20fe17e Merge pull request #75216 from rune-scape/rune-dependancy-errors
Script editor (GDScript): Show depended script errors
2023-07-24 19:32:20 +02:00
Yuri Sizov
2bd904e3db Merge pull request #73196 from Vilcrow/fix-lookup-symbol
Fix jumping to function definition using `Ctrl+LMB` or the "Lookup Symbol" button
2023-07-24 19:32:12 +02:00
rune-scape
83b01708b2 Script editor: Show depended script errors 2023-07-24 15:49:39 +02:00
S.V.I. Vilcrow
56e2fad319 Fixed the jumping to function definition using 'Ctrl+LMB' and the 'Lookup Symbol' button. 2023-07-12 21:30:35 +03:00
Ben
0803467334
Fix "Go to definition" for GDScript type hints
Fixes #68475.
2023-06-19 15:29:25 +02:00
Rémi Verschelde
11ee6fcef0
Merge pull request #68311 from RobertMasek/fix-go-to-definition
Fix functionality of Go To Definition for properties set/get
2023-06-18 16:26:42 +02:00
Rémi Verschelde
25b2f1780a
Style: Harmonize header includes in modules
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.

Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:

- Local includes
  * Conditional local includes
- Core includes
  * Conditional core includes
- Thirdparty includes
  * Conditional thirdparty includes
2023-06-15 14:35:45 +02:00
ajreckof
006e899bb3 sort code completions with rules
Fixups

Add levenshtein distance for comparisons, remove kind sort order, try to improve as many different use cases as possible

Trying again to improve code completion

Sort code autocompletion options by similarity based on input

To make it really brief, uses a combination `String.similiary`, the category system introduced in a previous PR, and some filtering to yield more predictable results, instead of scattering every completion option at seemingly random.

It also gives much higher priority to strings that contain the base in full, closer to the beginning or are perfect matches.

Also moves CodeCompletionOptionCompare to code_edit.cpp

Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
Co-Authored-By: Eric M <41730826+EricEzaM@users.noreply.github.com>
2023-05-23 05:12:34 +02:00
Clay John
610877e326
Merge pull request #72288 from MewPurPur/use-string-repeat
Use `String.repeat()` to optimize several String methods
2023-05-05 09:56:48 -07:00
VolTer
6b84e258d2 Use String.repeat() in more places 2023-05-01 02:27:46 +02:00
George Marques
0ba6048ad3
Add support for static variables in GDScript
Which allows editable data associated with a particular class instead of
the instance. Scripts with static variables are kept in memory
indefinitely unless the `@static_unload` annotation is used or the
`static_unload()` method is called on the GDScript.

If the custom function `_static_init()` exists it will be called when
the class is loaded, after the static variables are set.
2023-04-27 09:51:44 -03:00
Yuri Sizov
f3033da97d
Merge pull request #76170 from HolonProduction/string-highlight
Fix multi-line string highlighting with single quotes.
2023-04-18 18:01:02 +02:00
RedMser
2330ffb5a1 Add GDScript template to RichTextEffect 2023-04-18 14:02:04 +02:00
HolonProduction
bdb7045e2c Fix multi-line string highlighting with single quotes. 2023-04-17 15:58:39 +02:00
Danil Alexeev
9df96e97ea
GDScript: Misc fixes and improvements for signature generation
* Use type hints for `@GlobalScope` enums.
* Use plain `int` for `BitMask<T>`.
* Fix type hints for typed arrays.
* Use `Variant` and `void` type hints.
* Discard unnecessary class prefix.
2023-04-07 10:43:21 +03:00
Dmitrii Maganov
4e34cf238a GDScript: Change parser representation of class extends 2023-03-13 01:40:13 +02:00
Dmitrii Maganov
e289a4ab2c GDScript: Fix autocomplete inside a block with a type test condition 2023-03-09 23:53:27 +02:00
George Marques
c9e49c487d
GDScript: Limit recursion depth for completion functions
Avoid crashing if the completion gets stuck in infinite recursion while
trying to guess the expression type.
2023-02-20 14:55:13 -03:00
Dmitrii Maganov
8fe023ad93 GDScript: Rework type check 2023-02-17 19:57:18 +02:00
Rémi Verschelde
d405392847
Revert "Fixed the jumping to function definition using 'Ctrl+LMB'."
This reverts commit 7eb6367d5c.

Fixes #73058.
Fixes #73167.

This caused regressions, we'll retry with fixes for 4.1.
2023-02-13 17:58:59 +01:00
Rémi Verschelde
3f95b39cb3
Merge pull request #72789 from Vilcrow/fix-jump-to-definition
Fixed the jumping to function definition using 'Ctrl+LMB'.
2023-02-07 19:37:50 +01:00
S.V.I. Vilcrow
7eb6367d5c Fixed the jumping to function definition using 'Ctrl+LMB'. 2023-02-07 05:29:48 +03:00
Yuri Sizov
9d16250353
Merge pull request #70002 from poohcom1/fix/static-subscript-autocomplete
Fix code-completion suggesting non-static members for custom classes
2023-02-06 23:02:12 +03:00
Danil Alexeev
31749de128
GDScript: Better handling of @rpc annotation and autocompletion 2023-02-05 21:21:37 +03:00
Eric M
9b93bdb4e7 Fix crash in gdscript when autocompleting virtual function and signature does not match base. 2023-02-02 22:52:08 +10:00