Commit graph

77 commits

Author SHA1 Message Date
Rémi Verschelde ee5ea64e83
Merge pull request #40276 from Taywee/master
remove invalid codeLensProvider value from lsp
2021-02-25 17:26:26 +01:00
Vignesh1-art a5d931033e
Fixed Invalid function bindings #46135
Fixed  GDScriptLanguageProtocol::notify_client - have 3 arguments, but only 2 are binded
2021-02-18 11:12:54 +05:30
Rafał Mikrut f7209b459b Initialize class/struct variables with default values in modules/ 2021-02-08 10:57:18 +01:00
Rémi Verschelde 5525cd85c6
Merge pull request #45315 from RandomShaper/modernize_thread
Modernize Thread
2021-01-31 15:24:56 +01:00
Pedro J. Estébanez 99fe462452 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-01-29 12:02:13 +01:00
Aaron Franke e829b7aee4
Unify URI encoding/decoding and add to C#
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
2021-01-28 07:45:01 -05:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Rémi Verschelde cf62289d24
LSP: Fix iterator in enum API dump 2020-12-09 13:34:29 +01:00
bruvzg 644f739660
Static analyzer fixes:
Removes unused code in OS.
Fixes return types.
Fixes few typos.
2020-12-09 10:17:53 +02:00
Thakee Nathees 42bfa16996 Refactor DocData into core and editor (DocTools) parts 2020-12-02 00:48:39 +05:30
Aaron Franke 02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
bruvzg 80b8eff6aa
[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
George Marques fda6f3b600
GDScript: Fix LSP getting wrong union value on unnamed enums 2020-08-17 21:10:30 -03:00
George Marques a0f54cb95e
Wrap up GDScript 2.0 base implementation 2020-07-22 11:07:51 -03:00
George Marques b6a2628c48
Reenable GDScript LSP server 2020-07-20 11:38:40 -03:00
George Marques 5d6e853806
New GDScript tokenizer and parser
Sometimes to fix something you have to break it first.

This get GDScript mostly working with the new tokenizer and parser but
a lot of things isn't working yet. It compiles and it's usable, and that
should be enough for now.

Don't worry: other huge commits will come after this.
2020-07-20 11:38:39 -03:00
Ryan Roden-Corrent 8dcc39ec91
Include gdscript warning name in LSP message.
My initial attempt changed this in the gdscript code, which resulted in
a duplicate warning name in the builtin editor. We should just append
the warning name in the LSP instead.

This uses parens to match what is shown in the builtin editor.
2020-07-14 07:11:16 -04:00
Taylor C. Richberger 91ce8d5fff
remove invalid codeLensProvider value from lsp
codeLensProvider was false, it may not be a boolean like some of the other providers can, only optionally present.
2020-07-11 00:57:32 -06:00
Rémi Verschelde 786f4ada35 GDScript LSP: Fix wrong error checks added in #39385
Reverts `latest_client_id` back to 0, as I misunderstood how the client
IDs are assigned and, without further testing and debugging, I can't
say if this was a bug or a valid default value.
Similarly, a `latest_client_id` of -1 is no longer raising an error.

Fixes #39548.
2020-06-15 09:51:56 +02:00
Rémi Verschelde e34f33711b GDScript LSP: Fix crash in notify_client
`latest_client_id` now defaults to `-1` (invalid ID) instead of `0`.

Also fix typo in notification `gdscrip_client/changeWorkspace`,
and fix argument names in method binds.

Fixes #39375.
2020-06-08 11:01:45 +02:00
Oliver Frank 6815bf42b3 Fix incorrect capabilities notification in LSP
(cherry picked from commit 2173d041af)
2020-05-15 23:55:49 +02:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
Rémi Verschelde ea7b497065 Replace more occurrences of NULL with nullptr 2020-04-02 14:56:01 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky f8a79a97c7 Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
Rémi Verschelde cfd84625f0 Move DocData and Collada out of their subfolders
Now that the unused DocDump was removed, the `editor/doc` subfolder is
redundant.

Similarly, there's no reason for Collada to have a subfolder for itself
when glTF or OBJ don't.
2020-03-24 09:56:04 +01:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
Rémi Verschelde 7579a792be
Merge pull request #36683 from rafaeldelboni/master
Return only scenes for script owners on LSP completion
2020-03-08 16:19:31 +01:00
Rafael Delboni 2f08f4ef4e
fix: Return only scenes for script owners on LSP completion
Fix: #36680
2020-03-07 09:17:25 -03:00
Thakee Nathees 07c99340d1 typo in gdscript_workspace.cpp/remove_cache_parser() fixed 2020-03-05 20:51:02 +05:30
Rafael Delboni 06bce137e3
Improve LSP completion using scene owner
Fixes: #36473
2020-02-25 23:27:17 -03:00
Oliver Frank ed482f6167 Fix crash after closing a GDScript LSP session 2020-02-23 19:25:41 +00:00
of9 24b27043fe Migrating language server from Websockets to raw TCP 2020-02-20 11:21:43 +00:00
Juan Linietsky 69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Juan Linietsky 3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
geequlim 03d2d01082 Fix hover symbol content position 2020-02-12 17:59:20 +08:00
Francois Belair f6968d5f17 Fix static functions loop using class' functions
Besides being incorrect, it also caused a hard editor crash for purely
static classes or classes with more static functions than methods.
2020-01-28 14:19:09 -05:00
Houkime e1a0ce5af9 Prevent GDScript language server from listening to external hosts by default
* Add bind_ip property to WebSocketServer defaulting to "*" (listen to everyone)
* Set default for GDscript Language Server to listen only to localhost

Fixes potential security issue with GDScript language server being exposed to the
broad net by default.
Since it is the server which primary usage is to provide utility to the local
editor there is no need to expose it.
2020-01-15 00:29:59 +00:00
Rémi Verschelde 40f0649e5b Fix typos with codespell
Using codespell 1.16.0.

See ab3bccdb78 for procedure.
2020-01-15 00:49:52 +01:00
Geequlim d5e1890c85 Fix infinite loop error in document link parsing 2020-01-13 19:23:29 +08:00
geequlim e804eebfe5 Remove completion triggers for ',' and '(' which may conflict with signature helper 2020-01-11 23:51:25 +08:00
geequlim d901d5993b Allow enable/disable threading for LSP server
Restart LSP server when configurations change without restart the editor
2020-01-11 23:50:32 +08:00
Geequlim 6190d42825 LSP: Fix bracket completion for functions with one argument 2020-01-10 14:23:01 +08:00
geequlim d35c018a7a GDScript LSP: Implement signatureHelp
Enable smart resolve default to true as it is required for script symbol lookup
2020-01-09 00:57:54 +08:00
geequlim eb5861f9f1 GDScript LSP: Implement goto declaration 2020-01-04 20:02:26 +08:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00