summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/language_server/gdscript_text_document.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Merge pull request #96684 from HolonProduction/that-was-a-bit-too-smartRémi Verschelde2024-09-161-13/+0
|\ | | | | | | LSP: Don't use smart resolve for completion
| * LSP: Don't use smart resolve for completionHolonProduction2024-09-071-13/+0
| |
* | Fix script properties reload from external editorHilderin2024-09-141-2/+0
|/
* StringName Dictionary keysrune-scape2024-08-291-1/+1
| | | | | also added 'is_string()' method to Variant and refactored many String type comparisons to use it instead
* [GDScript LSP] Fix `show_native_symbol_in_editor`A Thousand Ships2024-05-261-1/+1
|
* Remove unnecessary `this->` expressionsA Thousand Ships2024-01-291-2/+2
|
* Merge pull request #86676 from rune-scape/sparse-script-reloadYuri Sizov2024-01-171-1/+1
|\ | | | | | | GDScript: Hot-reload changed scripts only
| * Hot-reload only changed scriptsrune-scape2024-01-021-1/+1
| |
* | Update deferred calls to use Callableskobewi2024-01-091-1/+1
|/
* Remove unnecessary assignmentsWilson E. Alvarez2023-12-131-3/+2
| | | | Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
* Fix external editor hot reloadOmar Shehata2023-10-071-0/+2
|
* Omit quotes from completion if triggered with quote0x44482023-09-211-0/+9
| | | | | | | | | Typing a single or double quote in an external editor triggers auto-completion. The returned CompletionItem should not include quotes since they're already in the editor. CompletionParams was missing context in to_json() and this is required to detect whether a quote was typed.
* Language Server: Improve hovered symbol resolution, fix renaming bugs, ↵BooksBaum2023-09-111-7/+48
| | | | | | | implement reference lookup Co-Authored-By: Ryan Brue <56272643+ryanabx@users.noreply.github.com> Co-Authored-By: BooksBaum <15612932+booksbaum@users.noreply.github.com>
* 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
|