summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/language_server/gdscript_text_document.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Style: Harmonize header includes in modulesRémi Verschelde2023-06-151-2/+3
| | | | | | | | | | | | | | | | | | | | 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
* Fix internal editor not updating when using external editor via LSPRindbee2023-01-221-0/+1
|
* call update_exports from LSP didSave functionAdam Wardell2023-01-201-0/+1
| | | | | 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
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | 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".
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-11/+11
| | | | change warnings=all to use /W4.
* Implement `GDScriptTextDocument::willSaveWaitUntil` to clean up outdated ↵Rindbee2022-10-041-12/+20
| | | | | | | documents before saving Implement `GDScriptTextDocument::willSaveWaitUntil` to clean up outdated documents before saving, then update the document in `GDScriptTextDocument::didSave`.
* Fix out of sync when the script is edited externally via lspRindbee2022-09-251-0/+1
| | | | | | | | | 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.
* Merge pull request #59482 from kurtlachmann/lsp_better_parenthesesRémi Verschelde2022-06-151-6/+2
|\
| * Use insertText from the internal autocompletionKurt Lachmann2022-03-241-6/+2
| | | | | | | | | | | | * 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.
* | Replace most uses of Map by HashMapreduz2022-05-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | * 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-121-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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<>
* | Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-111-4/+0
| |
* | Add GDExtension support to Scriptreduz2022-03-271-12/+14
|/ | | | | | | | | * 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).
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Remove extraneous return to LSPFrancois Belair2021-12-071-3/+0
|
* Fix empty line hover; fix open non-res:// scriptFrancois Belair2021-10-011-0/+3
|
* Use range iterators for `Map`Lightning_A2021-09-301-2/+2
|
* 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-061-3/+7
|
* Merge pull request #48615 from Razoric480/lsp-renameRémi Verschelde2021-08-051-0/+28
|\ | | | | Implement LSP didSave notification and rename request
| * Implement didSave notification and rename requestFrancois Belair2021-07-171-0/+28
| |
* | Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-8/+7
| |
* | 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.
* Implement didClose notification in LSPFrancois Belair2021-07-081-0/+6
|
* Make LSP update the filesystem of changed scriptsFrancois Belair2021-04-141-0/+1
| | | | | This updates global classes and exposes base member variables. Fixes #39713
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | 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 🎆
* Rename empty() to is_empty()Marcel Admiraal2020-12-281-4/+4
|
* GDScript LSP: Fix crash in notify_clientRémi Verschelde2020-06-081-0/+1
| | | | | | | | | `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.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-17/+0
| | | | | | | | | | | | | | 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.
* Replace NULL with nullptrlupoDharkael2020-04-021-3/+3
|
* Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky2020-03-261-1/+3
|
* Fix hover symbol content positiongeequlim2020-02-121-0/+2
|
* LSP: Fix bracket completion for functions with one argumentGeequlim2020-01-101-1/+1
|
* GDScript LSP: Implement signatureHelpgeequlim2020-01-091-0/+15
| | | | Enable smart resolve default to true as it is required for script symbol lookup
* GDScript LSP: Implement goto declarationgeequlim2020-01-041-54/+67
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Removed unused variables, add some constants numbersRafał Mikrut2019-12-101-2/+0
|
* Add custom api `textDocument/nativeSymbol` to allow inspect native symbols ↵geequlim2019-10-041-1/+22
| | | | from LSP clients
* Fix enumeration value of SymbolKind.geequlim2019-10-041-24/+28
| | | | | Add custom notification 'gdscript/show_native_symbol' to show native symbols in clients. Close client connections when stop gdscript-lsp
* Implement DocumentLink of GDScript LSP Servergeequlim2019-10-031-2/+11
|
* Changed some code found by Clang Tidy and Coverityqarmin2019-09-221-2/+2
|
* Improve code compeletion for virtual methods with signaturesgeequlim2019-08-111-1/+1
|
* Add optional goto definition support for native symbolsgeequlim2019-08-111-6/+38
| | | | | This action will show help for target symbol in godot editor and bring the godot editor window to foreground Improved markdown documentation for symbols.
* Add generate script api to dictionary supportGeequlim2019-08-111-15/+15
| | | | | Expose GDScriptLanguageProtocol singleton and classes for editor plugins (Not visiable in class tree) Fix minor bug in symbol resolve
* Improve symbol resolve for inner classesGeequlim2019-08-111-8/+14
| | | | | | Only level one inner classes would be resolved currently but it sould cover most real world use case Improve documation parseing for const values Improve documation format for native symbols
* Improved performance for completion and symbol resolvation.Geequlim2019-08-111-55/+88
| | | | | | Improved uri and workspace path translatation on windows platform. The smart resolvation is much faster than builtin's in the server side. The smart resolve mode is still disabled as default as the clients might be slow with a planty of completion items.
* Add optional smart resolve sulotiongeequlim2019-08-111-48/+136
| | | | The smart resolvaion can guess most symbols but it might be slow so disabled by default users can turn on it in the editor setting
* Add a symbol pool to cache all native symbols and workspackes symbols.geequlim2019-08-111-1/+56
| | | | | | | Implement hover Implement completion documentation resolve Implement hover documentation Implement go to definition
* Add GDScript Language Protocol plugingeequlim2019-08-111-0/+177