summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/language_server
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #59482 from kurtlachmann/lsp_better_parenthesesRémi Verschelde2022-06-152-7/+3
|\
| * Use insertText from the internal autocompletionKurt Lachmann2022-03-242-7/+3
| | | | | | | | | | | | * GDScriptLanguage::complete_code already adds parentheses to function calls, and does this a lot smarter than the language server right now. * Instead of the previous naive approach we now reuse the same logic as the internal editor. * For this to have any effect we also have to send the `insertText` field already during the completionRequest and not only during resolve.
* | Add a new HashSet templatereduz2022-05-201-1/+1
| | | | | | | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* | Use range iterators for RBSet in most casesAaron Record2022-05-191-2/+2
| |
* | Replace most uses of Map by HashMapreduz2022-05-165-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | * 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!
* | Add a new HashMap implementationreduz2022-05-124-59/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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<>
* | Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio2022-05-032-2/+2
| | | | | | | | | | | | These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
* | Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-114-8/+3
| |
* | Zero initialize all pointer class and struct membersRémi Verschelde2022-04-041-1/+1
| | | | | | | | | | This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
* | Add GDExtension support to Scriptreduz2022-03-273-15/+17
|/ | | | | | | | | * 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).
* Convert _notification methods to switch - Chunk CJakob Bouchard2022-02-161-4/+7
|
* Cleanup and move char functions to the `char_utils.h` header.bruvzg2022-02-041-2/+2
|
* String: Add contains().Anilforextra2022-02-042-3/+3
|
* Merge pull request #57205 from TechnoPorg/variant-template-castRémi Verschelde2022-01-271-1/+1
|\ | | | | Allow method binds to take Object subclasses as arguments
| * Allow method binds to take Object subclasses as argumentsTechnoPorg2022-01-251-1/+1
| | | | | | | | | | | | 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.
* | Rename String::is_subsequence_ofi to String::is_subsequence_ofnWilson E. Alvarez2022-01-261-1/+1
|/
* Update copyright statements to 2022Rémi Verschelde2022-01-0311-22/+22
| | | | Happy new year to the wonderful Godot community!
* Remove extraneous return to LSPFrancois Belair2021-12-071-3/+0
|
* Merge pull request #55624 from Razoric480/raz/cs-lsp-signalRémi Verschelde2021-12-061-1/+5
|\
| * Prevent LSP adding signal func to non GDScriptsFrancois Belair2021-12-041-1/+5
| |
* | Auto-Increment Debugger PortNathan Franke2021-12-041-1/+1
|/ | | | 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.
* Rename `remove()` to `remove_at()` when removing by indexLightning_A2021-11-231-1/+1
|
* Modules: Make sure to include modules_enabled.gen.h where neededRémi Verschelde2021-11-121-1/+1
|
* Fix LSP crash when parsing signal symbols.Francois Belair2021-11-071-1/+1
| | | | | | 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 .
* Move the docs for constructors and operators out of methods sectionAaron Franke2021-10-291-0/+2
|
* clang-format: Various fixes to comments alignment from `clang-format` 13Rémi Verschelde2021-10-281-43/+43
| | | | All reviewed manually and occasionally rewritten to avoid bad auto formatting.
* Remove unimplemented methodsMarcel Admiraal2021-10-211-2/+0
|
* GDScript: Report property type errorsZuBsPaCe2021-10-081-1/+1
| | | | | | | | | 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
* Fix empty line hover; fix open non-res:// scriptFrancois Belair2021-10-013-3/+9
|
* Use range iterators for `Map`Lightning_A2021-09-304-27/+27
|
* Make LSP report _init instead of Object::newFrancois Belair2021-09-292-3/+6
|
* Remove duplicate WorkspaceEdit from LSPFrancois Belair2021-09-251-40/+10
|
* Merge pull request #50378 from Razoric480/apply-edit-40Rémi Verschelde2021-09-255-0/+126
|\
| * Implement applyEdit in LSP for signal connectingFrancois Belair2021-07-115-0/+126
| |
* | LSP: Add support for custom host settingJohn J. Donna II2021-09-202-2/+6
| | | | | | | | | | You can now configure host in the `language_server` settings in the editor settings.
* | Style: Cleanup code using `text_editor/completion/use_single_quotes`Rémi Verschelde2021-08-131-2/+2
| |
* | Fix LSP completion crashing on scene-less scriptsFrancois Belair2021-08-062-16/+22
| |
* | Fix LSP parsing get_node only from the scene rootFrancois Belair2021-08-051-1/+22
| |
* | Merge pull request #51247 from pycbouh/docs-extract-theme-itemsRémi Verschelde2021-08-051-6/+12
|\ \ | | | | | | Add theme item descriptions to the online documentation
| * | Add theme item descriptions to the online documentationYuri Sizov2021-08-041-6/+12
| | |
* | | Merge pull request #48615 from Razoric480/lsp-renameRémi Verschelde2021-08-055-2/+175
|\ \ \ | |/ / |/| | Implement LSP didSave notification and rename request
| * | Implement didSave notification and rename requestFrancois Belair2021-07-175-2/+175
| | |
* | | Merge pull request #50454 from Ev1lbl0w/gsoc21-dapFabio Alessandrelli2021-08-031-2/+2
|\ \ \ | | | | | | | | Implemented initial DAP support
| * | | Implemented initial DAP supportEv1lbl0w2021-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Fix LSP reporting wrong typesFrancois Belair2021-07-262-31/+31
| | | |
* | | | Use const references where possible for List range iteratorsRémi Verschelde2021-07-252-3/+3
| | | |
* | | | Use C++ iterators for Lists in many situationsAaron Franke2021-07-233-20/+15
| | | |
* | | | [Net] Single `rpc` annotation. "sync" no longer part of mode.Fabio Alessandrelli2021-07-201-1/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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).
* / / Optimize StringName usagereduz2021-07-181-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | * 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.
* | Misc cleanup of header includesRémi Verschelde2021-07-151-3/+9
| | | | | | | | | | Was looking for misuse of module headers without checking that the module is actually enabled and got carried away...