summaryrefslogtreecommitdiff
path: root/modules/gdscript/language_server
AgeCommit message (Collapse)Author
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-19Use range iterators for RBSet in most casesAaron Record
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-12Add a new HashMap implementationreduz
Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
2022-05-03Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio
These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
2022-04-11Make FileAccess and DirAccess classes reference counted.bruvzg
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
2022-03-27Add GDExtension support to Scriptreduz
* Ability to create script languages from GDExtension * Some additions to gdnative_extension.h to make this happen * Moved the GDExtension binder to core This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x. Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
2022-02-16Convert _notification methods to switch - Chunk CJakob Bouchard
2022-02-04Cleanup and move char functions to the `char_utils.h` header.bruvzg
2022-02-04String: Add contains().Anilforextra
2022-01-27Merge pull request #57205 from TechnoPorg/variant-template-castRémi Verschelde
Allow method binds to take Object subclasses as arguments
2022-01-26Rename String::is_subsequence_ofi to String::is_subsequence_ofnWilson E. Alvarez
2022-01-25Allow method binds to take Object subclasses as argumentsTechnoPorg
This commit adds a condition to VariantCaster that casts Variants of type OBJECT to any type T, if T is derived from Object. This change enables a fair bit of code cleanup. First, the Variant implicit cast operators for Node and Control can be removed, which allows for some invalid includes to be removed. Second, helper methods in Tree whose sole purpose was to cast arguments to TreeItem * are no longer necessary. A few small changes also had to be made to other files, due to the changes cascading down all the includes.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-07Remove extraneous return to LSPFrancois Belair
2021-12-06Merge pull request #55624 from Razoric480/raz/cs-lsp-signalRémi Verschelde
2021-12-04Auto-Increment Debugger PortNathan Franke
Note: This PR also changes the port of the GDScript Language Server from 6008 to 6005. This opens enough ports above the debug port (6007) for this change to be useful.
2021-12-04Prevent LSP adding signal func to non GDScriptsFrancois Belair
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-11-12Modules: Make sure to include modules_enabled.gen.h where neededRémi Verschelde
2021-11-07Fix LSP crash when parsing signal symbols.Francois Belair
If the number of parameters was less than the number of class members, the LSP would cause godot to crash because it was using the index for class members instead of the index for signal parameters. Fixes #54720 .
2021-10-29Move the docs for constructors and operators out of methods sectionAaron Franke
2021-10-28clang-format: Various fixes to comments alignment from `clang-format` 13Rémi Verschelde
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-21Remove unimplemented methodsMarcel Admiraal
2021-10-08GDScript: Report property type errorsZuBsPaCe
Inline getters & setters are now FunctionNodes. Their names are set in the parser, not in the compiler. GDScript-Analyzer will now run through getter and setter. Also report wrong type or signature errors regarding getset properties. Added GDScript tests for getters and setters. #53102
2021-10-01Fix empty line hover; fix open non-res:// scriptFrancois Belair
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-29Make LSP report _init instead of Object::newFrancois Belair
2021-09-25Remove duplicate WorkspaceEdit from LSPFrancois Belair
2021-09-25Merge pull request #50378 from Razoric480/apply-edit-40Rémi Verschelde
2021-09-20LSP: Add support for custom host settingJohn J. Donna II
You can now configure host in the `language_server` settings in the editor settings.
2021-08-13Style: Cleanup code using `text_editor/completion/use_single_quotes`Rémi Verschelde
2021-08-06Fix LSP completion crashing on scene-less scriptsFrancois Belair
2021-08-05Fix LSP parsing get_node only from the scene rootFrancois Belair
2021-08-05Merge pull request #51247 from pycbouh/docs-extract-theme-itemsRémi Verschelde
Add theme item descriptions to the online documentation
2021-08-05Merge pull request #48615 from Razoric480/lsp-renameRémi Verschelde
Implement LSP didSave notification and rename request
2021-08-04Add theme item descriptions to the online documentationYuri Sizov
2021-08-03Merge pull request #50454 from Ev1lbl0w/gsoc21-dapFabio Alessandrelli
Implemented initial DAP support
2021-08-02Implemented initial DAP supportEv1lbl0w
Implemented "output" event Refactored "seq" field generation Prevent debugging when editor and client are in different projects Removed unneeded references to peer on the parser Refactored way to detect project path Implemented "setBreakpoints" request Fix double events when terminating from client Refactored "stopped" event Implemented "stopped" with breakpoint event Implemented "stackTrace", "scopes" and "variables" request Report incoming number of stack dump variables Implemented proper reporting of scopes and variables from stack frames Prevent editor from grabbing focus when a DAP session is active Implemented "next" and "stepIn" requests Implemented "Source" checksum computing Switched expected errors from macros to silent guards Refactored message_id Respect client settings regarding lines/columns behavior Refactored nested DAP fields Implement reporting of "Members" and "Globals" scopes as well Fix error messages not being shown, and improved wrong path message
2021-07-26Fix LSP reporting wrong typesFrancois Belair
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-20[Net] Single `rpc` annotation. "sync" no longer part of mode.Fabio Alessandrelli
- Move the "sync" property for RPCs to RPCConfig. - Unify GDScript annotations into a single one: - `@rpc(master)` # default - `@rpc(puppet)` - `@rpc(any)` # former `@remote` - Implement three additional `@rpc` options: - The second parameter is the "sync" option (which also calls the function locally when RPCing). One of "sync", "nosync". - The third parameter is the transfer mode (reliable, unreliable, ordered). - The third parameter is the channel (unused for now).
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-07-17Implement didSave notification and rename requestFrancois Belair
2021-07-15Misc cleanup of header includesRémi Verschelde
Was looking for misuse of module headers without checking that the module is actually enabled and got carried away...
2021-07-13Implement the ability to disable classesreduz
* This PR adds the ability to disable classes when building. * For now it's only possible to do this via command like: `scons disable_classes=RayCast2D,Area3D` * Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
2021-07-11Implement applyEdit in LSP for signal connectingFrancois Belair
2021-07-08Implement didClose notification in LSPFrancois Belair