Commit Graph

204 Commits

Author SHA1 Message Date
Thaddeus Crews
b37fc1014a
Style: Apply new clang-format changes 2024-09-20 08:09:48 -05:00
Rémi Verschelde
964a9ec03b
Merge pull request #96684 from HolonProduction/that-was-a-bit-too-smart
LSP: Don't use smart resolve for completion
2024-09-16 15:25:44 +02:00
Rémi Verschelde
3b714ded01
Merge pull request #96725 from HolonProduction/lsp-omit
LSP: Omit some values based on specification version 3.17
2024-09-16 13:34:50 +02:00
Hilderin
46edd6df55 Fix script properties reload from external editor 2024-09-14 15:07:53 -04:00
A Thousand Ships
dd6443193c
[Editor] Expose more editor settings to documentation
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2024-09-12 15:34:49 +02:00
HolonProduction
4d713d91b5 LSP: Omit some values based on specification version 3.17 2024-09-08 21:07:19 +02:00
HolonProduction
8155c1f836 LSP: Don't use smart resolve for completion 2024-09-07 16:23:25 +02:00
Rémi Verschelde
13a90e938f
Merge pull request #70096 from rune-scape/stringname-dict
StringName Dictionary keys
2024-09-03 17:38:06 +02:00
A Thousand Ships
194bdde947
Cleanup of raw nullptr checks with Ref
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
2024-08-31 15:01:09 +02:00
rune-scape
154049ce17 StringName Dictionary keys
also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
2024-08-29 13:39:27 -07:00
Rémi Verschelde
62120c7841
Fix Steam input "crc" errors, and some other Coverity reports of uninitialized scalar variable
- Fixes #88630.
- Fixes #92578.
2024-05-31 09:55:02 +02:00
A Thousand Ships
e6ab22d450
[GDScript LSP] Fix show_native_symbol_in_editor 2024-05-26 16:33:19 +02:00
A Thousand Ships
a0dbdcc3ab
Replace find with contains/has where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
A Thousand Ships
955d5affa8
Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Rémi Verschelde
13fbd42c37
Merge pull request #90975 from aaronfranke/plugin-org
Organize existing code for editor plugins
2024-04-29 10:09:45 +02:00
Aaron Franke
1bcbbe96c4
Organize existing code for editor plugins 2024-04-27 11:59:58 -07:00
R. Alex Hofer
2452176990 Have GDScriptWorkspace::list_script_files respect .gdignore. 2024-04-20 13:29:27 -04:00
Mikael Hermansson
e2485044a1 Allow LSP to process multiple messages per poll 2024-03-08 18:49:29 +01:00
Danil Alexeev
8ffc50ee8c
GDScript: Canonicalize script path in FQCN 2024-02-26 10:46:24 +03:00
Robert Yevdokimov
13e82094ee Remove word duplicates in comments and strings, and fix casing and punctuation 2024-02-23 17:28:28 -05:00
kobewi
a031911c82 Use check_changed_settings_in_group() everywhere 2024-02-19 21:34:45 +01:00
Danil Alexeev
a2e3e31e80
GDScript: Fix extension comparison for exported scripts 2024-02-15 17:53:24 +03:00
George Marques
b4d0a09f15
GDScript: Reintroduce binary tokenization on export
This adds back a function available in 3.x: exporting the GDScript
files in a binary form by converting the tokens recognized by the
tokenizer into a data format.

It is enabled by default on export but can be manually disabled. The
format helps with loading times since, the tokens are easily
reconstructed, and with hiding the source code, since recovering it
would require a specialized tool. Code comments are not stored in this
format.

The `--test` command can also include a `--use-binary-tokens` flag
which will run the GDScript tests with the binary format instead of the
regular source code by converting them in-memory before the test runs.
2024-02-08 11:20:05 -03:00
A Thousand Ships
15369fdb1d
Remove unnecessary this-> expressions 2024-01-29 09:59:18 +01:00
Yuri Sizov
c027aecc2e Merge pull request #86676 from rune-scape/sparse-script-reload
GDScript: Hot-reload changed scripts only
2024-01-17 18:52:54 +01:00
kobewi
0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
rune-scape
cde478bda6 Hot-reload only changed scripts 2024-01-02 17:56:52 -08:00
Wilson E. Alvarez
80fb8db31f
Remove unnecessary assignments
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-12-13 11:06:26 -05:00
Omar Shehata
c25a2d832b Fix external editor hot reload 2023-10-07 22:14:54 -04:00
A Thousand Ships
517e9f8aef [Modules] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-26 16:44:52 +02:00
0x4448
7ea4247c3d Omit quotes from completion if triggered with quote
Typing a single or double quote in an external editor triggers
auto-completion. The returned CompletionItem should not include
quotes since they're already in the editor.

CompletionParams was missing context in to_json() and this is
required to detect whether a quote was typed.
2023-09-21 17:37:32 -07:00
ryanabx
a5b7c4c415 Add --lsp-port as a command line argument 2023-09-18 08:51:15 -05:00
William Edwards
188132884d Fix dumping of signal API parameters 2023-09-12 18:43:31 -07: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
azuloo
a5710d468b Fixes LSP connection error when launched in a separate thread 2023-08-16 16:29:28 +03:00
Rémi Verschelde
faaf27f284
Fix various typos with codespell
Also includes typo fixes from #79993, #80068, #80276, and #80303.

Co-authored-by: betalars <contact@betalars.de>
Co-authored-by: spaceyjase <429978+spaceyjase@users.noreply.github.com>
Co-authored-by: Swarkin <102416174+Swarkin@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-08-07 13:09:47 +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
Александр Черник
5715d3eb59 LSP: don't send empty completion command 2023-05-06 20:56:15 +01:00
Adam Scott
10fe6f14bb Fix GDScript LSP variable rename 2023-04-22 14:35:34 -04:00
Yuri Sizov
9882af4880
Merge pull request #76197 from dalexeev/fix-error-macro-misuses
Fix misuses of error macros
2023-04-18 16:11:37 +02:00
Danil Alexeev
36bedd341a
Fix misuses of error macros 2023-04-18 10:20:48 +03:00
Adam Scott
879791e305 Fix typo when parsing LSP function parameters 2023-04-15 09:05:53 -04:00
Ricardo Subtil
4be4eeea3a Poll LSP/DAP clients for connection status updates 2023-04-09 12:36:01 +01:00
Dmitrii Maganov
4e34cf238a GDScript: Change parser representation of class extends 2023-03-13 01:40:13 +02:00
Rindbee
64edc7a5c2 Fix internal editor not updating when using external editor via LSP 2023-01-22 18:27:22 +08:00
Adam Wardell
e9d8c261a5 call update_exports from LSP didSave function
exports in the inspector were not properly appearing when a gdscript was saved using an external IDE
this commit adds a call to GDScript::UpdateExports toward the end of GDScriptTextDocument::didSave
2023-01-20 19:16:53 -08:00
Dmitrii Maganov
a1d06749f1 Unify typing of variables, constants and parameters in GDScript 2023-01-06 01:10:04 +02:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Quentin Guidée
e0f1e02cc7
Fix use of comma instead of semicolon
Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com>
2022-12-17 20:17:04 -05:00
Bartosz Bielecki
2af4f7f762 Keep GDScriptAnalyzer alive for whole parse()
Analyzed data is allocated by Parser but kept as a reference in the cache
which in turn is held by the Analyzer. If Analyzer goes away Parser is left
with a tree of dangling references.

Code is analogous to all other usages of Analyzer + Parser pair.
2022-12-06 10:01:18 +01:00