summaryrefslogtreecommitdiff
path: root/modules/gdscript/language_server
AgeCommit message (Collapse)Author
2022-11-29Use forward-declarations in big editor classestrollodel
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-10-05Merge pull request #66885 from atirut-w/lsp-doc-fixRémi Verschelde
LSP: Fix GDScript doc comments
2022-10-05LSP: Fix GDScript doc commentsAtirut Wattanamongkol
2022-10-04Implement `GDScriptTextDocument::willSaveWaitUntil` to clean up outdated ↵Rindbee
documents before saving Implement `GDScriptTextDocument::willSaveWaitUntil` to clean up outdated documents before saving, then update the document in `GDScriptTextDocument::didSave`.
2022-09-25Fix out of sync when the script is edited externally via lspRindbee
Previously, external editing via lsp would modify the modified time of the script, which caused the internal display of the script to not be refreshed when refocusing the engine. Now saving the script externally via lsp will automatically refresh the internal display.
2022-08-31fix: add uri_decode to root_uri #63388Lamia
2022-08-29Rename String `plus_file` to `path_join`Aaron Franke
2022-08-08fix: modifies workspace->root_uri so that p_uri is symmetrical to other ↵Lamia
operating systems. #63388
2022-07-31Extract EditorResourceConversionPlugin into its own source files and clean ↵Yuri Sizov
up editor includes
2022-07-28Merge pull request #63049 from Faless/mp/4.x_as_moduleRémi Verschelde
2022-07-28LSP: Sanitizes protocol URI `file:///c%3A` in file pathLamia
Fixes #63205.
2022-07-26[Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli
- RPC configurations are now dictionaries. - Script.get_rpc_methods renamed to Script.get_rpc_config. - Node.rpc[_id] and Callable.rpc now return an Error. - Refactor MultiplayerAPI to allow extension. - New MultiplayerAPI.rpc method with Array argument (for scripts). - Move the default MultiplayerAPI implementation to a module.
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-07-05Add grouping annotations for class properties in GDScriptYuri Sizov
2022-06-15Merge pull request #59482 from kurtlachmann/lsp_better_parenthesesRémi Verschelde
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-03-24Use insertText from the internal autocompletionKurt Lachmann
* 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.
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