Commit Graph

95 Commits

Author SHA1 Message Date
36622694ee Re-extracted class docs. 2024-09-08 17:02:09 +02:00
f93f0e1984 Disabled the unused argument warning by default. 2024-07-18 11:13:26 +02:00
c7ac1db971 Clang format everything. 2024-07-16 21:23:54 +02:00
38dd206a3b Tweaks to the editor defaults. 2024-07-16 20:19:54 +02:00
Mikael Hermansson
bffa53c645 Allow LSP to process multiple messages per poll
(cherry-picked from commit e2485044a1b33628e6149d4f930b6fe065743c9d)
2024-07-14 07:23:38 +02:00
6783cb92ab Re-extracted class docs. 2024-04-26 17:32:25 +02:00
3f2ed008d1 Fix compile errors. 2024-04-14 16:55:07 +02:00
Kirill Diduk
1a231787b0 Check duplicate keys in dictionary literals: enums and const variables
Check identifiers (const variables and unnamed enums) and named
enums when parsing dictionary literals whether the keys are not
duplicated.

In case of duplicate key is encountered, highlight the line with it
and print error message:
`Duplicate key "foo" found in Dictionary literal`

This commit is a logical continuation of the commit dab73c7 which
implemented such checks only for literal keys (which fixed #7034).

Apart from that, this commit also fixes the issue with the error
message itself, which was shown one line below the duplicated key
in case it was the last one in the dictionary literal and there
was no hanging comma.

Also, the format of the error message has been changed so that now
the error message also contains the value of the key which is duplicated.
Instead of `Duplicate key found in Dictionary literal`, it now prints
`Duplicate key "<value>" found in Dictionary literal`

Fixes #50971
2024-04-14 16:37:55 +02:00
0edc5438dd Re-extracted class docs. 2024-02-25 10:26:26 +01:00
3da74f0703 Added get_global_class_name method to Script. Now GDScriptParser uses this first to determine global class names, instead of parsing the script file again. 2024-02-13 20:09:46 +01:00
Danil Alexeev
0c92de12c1 GDScript: Fix get_method_list for custom functions 2024-02-08 14:50:56 +01:00
Danil Alexeev
a70e3ce4b3 GDScript: Prevent native class shadowing 2024-02-08 13:23:04 +01:00
d4d4a737fb Fix build when the jsonrpc module is disabled. 2023-12-24 00:02:22 +01:00
Jason Knight
929ad6b766 Far faster and more efficient method of checking if an identifer refers an autoload. 2023-12-20 22:45:03 +01:00
ae854d4e55 File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
191e9e152e Added quote_style argument to get_argument_options(). 2023-12-10 16:02:08 +01:00
93a2081a58 Re-extracted class docs. 2023-10-12 01:59:32 +02:00
13f981c684 Initialize variable. 2023-10-02 19:38:51 +02:00
d4b82d2724 Added setting to enable / disable gdscript's language server. 2023-10-02 19:37:38 +02:00
84768b8f0c GDScript LSP compile fix pt2. 2023-10-02 19:22:04 +02:00
f10681e2be GDScript LSP compile fix pt1. 2023-10-02 19:06:13 +02:00
4047443e5d Added back the language server for gdscript. 2023-10-02 18:32:24 +02:00
7fab5e4c25 Implemented a literal syntax for NodePaths in GDScript I decided on using godot4's (^). The doc already said it's '@' but that was wrong. 2023-09-06 20:45:01 +02:00
0a9c9ca15e Ported godot pr: [3.x] Allow exporting custom resources from/to any scripting language (GDScript, VisualScript, C#, NativeScript, PluginScript)
- willnationsdev
https://github.com/godotengine/godot/pull/44879
Using the rebased version from 02d1f70ee5 by Atlinx
2023-09-06 01:45:29 +02:00
62e2b1623a Use NULLs. 2023-08-30 13:24:46 +02:00
5d93975c8d Ported: Fix custom res caching sub-res even if no-cache
-Razoric480
2ceb93bbef
2023-08-30 12:55:37 +02:00
Hugo Locurcio
892fcff2e1 Document how to use logarithm of base 10 with log()
(cherry picked from commit 3c4f0ca9c639e11b3a0673b27427538b244533b6)
2023-08-30 10:49:09 +02:00
86c9343349 Updated the links in the docs. 2023-08-29 22:33:15 +02:00
8ed3b41865 Re-extracted class docs. 2023-08-26 22:41:21 +02:00
1a5cba555c Backported godot4 PR: 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.
- reduz
PR 76582
Will be available here after it's merged:
6b176671c4
2023-06-14 14:43:55 +02:00
a7f1f3356c Re-extracted class docs pt2. 2023-06-13 16:51:37 +02:00
lawnjelly
22d90711da Make acos and asin safe
A common bug with using acos and asin is that input outside -1 to 1 range will result in Nan output. This can occur due to floating point error in the input.

The standard solution is to provide safe_acos function with clamped input. For Godot it may make more sense to make the standard functions safe.
2023-06-11 08:41:42 +02:00
f058c87868 Backported from godot4: Rework Navigation Avoidance
Rework Navigation Avoidance.
- smix8
a6ac305f96
2023-06-10 20:58:49 +02:00
HolonProduction
4410d81189 Suggest class_name in 3.x autocompletion. 2023-05-01 12:30:43 +02:00
09138d762c Ported: Use hash table for GDScript parsing
GDScript now uses hash table for lookup of type lists / functions / keywords, instead of linear String comparisons.
- lawnjelly
19f2006ec0
2023-03-18 09:44:01 +01:00
3d1abe86fb Ported: GDScriptParser - don't use index operator on linked list
Index operators are super slow with linked lists. This came up in profiling the parsing, iterating sequentially using iterator is much faster.
- lawnjelly
ef914dac31
2023-03-18 09:29:08 +01:00
59a4e14b22 Ported: Allow unicode identifier in GDScript syntax highlighter
- timothyqiu
5a283bdbcd
2023-02-21 13:32:12 +01:00
d5cbb5ce1d Ported: Improve GDScript Editor and Improve latency
Improvements:
- GDScript Highlighter is faster by 25% as keys are smaller (hashes instead of strings)
- Removes message queue from _apply_settings_change to allow resize to work correctly
- Some performance fixes are pending still
Note: this resolves the code editor behaving badly when resizing in debug builds
- RevoluPowered, akien-mga
1881b3adc5
2023-02-21 13:24:53 +01:00
c3f01e0b3d Ported: Highlight control flow keywords with a different color. This makes them easier to distinguish from other keywords.
- Calinou
e905e8f145
2023-02-21 13:20:25 +01:00
8eca52fc76 Ported: Fix highlight color for class attributes that are also keywords.
- lucasvanmol
749d0c708c
2023-02-21 13:14:09 +01:00
e42c604bc3 Ported: Switch from recursion to iterative for backfilling colour regions.
- Paulb23
ee4a1c99a7
2023-02-21 13:11:37 +01:00
a79792ee67 Ported: Fix color region end key seach and start key order.
- Paulb23
6cdcdbc242
2023-02-21 13:08:49 +01:00
6ea9b581d7 Ported: Fix colour region continuation over blank lines, issue 41120
- Paulb23
5cf2cf8646
2023-02-21 12:53:41 +01:00
c356806ebf Ported: Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighter
- Extacted all syntax highlighting code from text edit
- Removed enable syntax highlighting from text edit
- Added line_edited_from signal to text_edit
- Renamed get/set_syntax_highlighting to get/set_syntax_highlighter
- Added EditorSyntaxHighligher
- Paulb23
bc4cee4458
2023-02-21 01:30:59 +01:00
0edf8fe956 Ported: Convert syntax highlighters into a resource
- Paulb23
2f1080be9b
2023-02-20 14:51:10 +01:00
6026725f3b Renamed ScriptEditor to EditorScriptEditor. 2023-02-18 16:52:26 +01:00
990f8aaecd Prefix filenames in the editor_script_editor module with editor_. 2023-02-18 16:22:59 +01:00
6e88ad5bae Moved the editor_code_editor module to the editor_modules folder. 2023-02-18 15:45:50 +01:00
a14821587f Renamed the code_editor module to editor_code_editor. 2023-02-18 15:31:58 +01:00
65c91c6899 Moved ScriptEditorPlugin and ScriptEditor out from the editor folder. 2023-02-18 15:08:56 +01:00