aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/languageclient
Commit message (Collapse)AuthorAgeFilesLines
* LanguageClient: postpone unreachable server error reportingDavid Schulz32 hours1-2/+4
| | | | | | | | | | Since the overall nature of the communication is asynchronous calling functions might not expect that an error is reported from within the sendMessage function. Fixes: QTCREATORBUG-31054 Change-Id: Ie73510eb632408a9f7a9367c3a3e47ad021da7fe Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* LuaLC: Register Settings typeMarcus Tillmanns7 days1-0/+7
| | | | | Change-Id: I58b3817e83c598b62e0ae5e61c21043d2c3290a7 Reviewed-by: David Schulz <david.schulz@qt.io>
* LanguageClient: Don't store client settings multiple timesMarcus Tillmanns9 days1-2/+4
| | | | | Change-Id: Iff6dcfef4d8f1e5cc01b48f2a4cf12f4c5927581 Reviewed-by: David Schulz <david.schulz@qt.io>
* LuaLSC: Fix crash on exitMarcus Tillmanns10 days1-5/+16
| | | | | | | | | | | | | | | Since the client lives longer than the lua context, its destruction would also cleanup the custom handlers which had captured the lua function. Calling anything as well as the destructor of a sol object after the lua context is gone results in a crash, so make sure that we don't keep it around any longer. A better solution in the long term would be to allow custom handlers to be unregistered in the Language Client. Change-Id: I59ac39d9279dc5faf24d3fd3b29e8c7c00e2b48e Reviewed-by: David Schulz <david.schulz@qt.io>
* Add long descriptions to some pluginsLeena Miettinen2024-05-311-1/+4
| | | | | | | | | | | | Edited the short descriptions to answer the question "What can I do with this extension" to help users decide whether they need it. In long descriptions, tell users what else they need to be able to use the plugin. Change-Id: Iefce7505b61fc77cf38cc915f1f7dbd25c9cb570 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* PluginSpecs: Change URLs from http:// to https://Alessandro Portale2024-05-282-2/+2
| | | | | | | | | | Avoid the redirect that is inevitable nowerdays. Also, change necessitas.kde.org to www.qt.io, since the orgininal page is offline. Change-Id: Ib1823f0df97d2df87822fd2bb7552e2f2c7e971e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Use LayoutBuilder V2hjk2024-05-273-9/+12
| | | | | | | | | | | | This puts the implementation introduced in acf1ecb47fdf into use, after significant simplifications in the class hierarchy. CRTP is not used anymore, and the new tag based dispatch is also used for Layout::addItem, effectively reducing the number of different code paths. The Lua based settings access is disabled for now. Change-Id: Idb6d1a25675378757c5267bdb630bcd4c1f52d34 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* TextEditor: Add a convenience overload for RefactoringFile::apply()Christian Kandeler2024-05-241-2/+1
| | | | | | | | | ... and make use of it. In most contexts, apply() immediately follows setChangeSet(), so combining the two can save a lot of code on the call site. Change-Id: I421001bd47000cb64678a57b19760becf59a4863 Reviewed-by: David Schulz <david.schulz@qt.io>
* Lua: Add Install moduleMarcus Tillmanns2024-05-241-2/+3
| | | | | | | Allows plugins to install packages they might need. Change-Id: I4948dd0a6568e093fc35e4486d2e2a084090e103 Reviewed-by: David Schulz <david.schulz@qt.io>
* LanguageClient: Let clients opt out of sending the didSave messageChristian Kandeler2024-05-212-1/+2
| | | | | | | | | | | | | | ... and make use of it in ClangdClient. When a file gets saved, clangd checks all open documents for whether they are affected by that. While the answer is usually "no", there is still one thread per document being started to find that out, which triggers users who keep a close watch on CPU usage. To alleviate this, we now send the didSave message only for header files. Fixes: QTCREATORBUG-28580 Change-Id: Id761cec8b04e95a795c8bd8754466bf03b6f2c28 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* AsyncTask: Centralize setting global future synchronizerEike Ziller2024-05-211-4/+0
| | | | | | | | | | | Move the global FutureSynchronizer to Utils and use it by default for AsyncTask (if that is in the main thread). This way setting a synchronizer is less prone to be forgotten. Individual uses can still override this. Change-Id: I1a12bf4d7f4cb5be99668bf0a4797108c2fe6448 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* LanguageClient: Fix conditionEike Ziller2024-05-171-1/+1
| | | | | | | | Amends 770f1b0376db49b9ea5aad906dd6165ab71d9152 Change-Id: I289bc9af8499860e58a95e9c1d83faf92c8056f9 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* LSP: Remove unused function declarationMarcus Tillmanns2024-05-161-3/+0
| | | | | | Change-Id: Ib8841b7eafb225faaa7952fde6c71cbcf6848c4f Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* Lua LSP: Add callback if server fails to startMarcus Tillmanns2024-05-161-18/+55
| | | | | | Change-Id: I422baeffff96cf56a110cbf74716352c9104c5ef Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* LanguageClient: Add "unexpected" argument to clientRemoved() signalMarcus Tillmanns2024-05-162-5/+5
| | | | | | Change-Id: I25b6b13759d6052bfc15fc78ac60c532a55885b8 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* LanguageClient: Fix crashEike Ziller2024-05-071-1/+1
| | | | | | | Amends 770f1b0376db49b9ea5aad906dd6165ab71d9152 Change-Id: Idb490e0992d631af81d3da0cee682ebb87567077 Reviewed-by: David Schulz <david.schulz@qt.io>
* LanguageClient: Avoid calling throwing functionsEike Ziller2024-05-0710-100/+89
| | | | | | | | | | | Similar to with std::optional we want to avoid calling throwing functions for std::variant, which includes std::get. In many cases this also avoids the chain of `std::holds_alternative` + `std::get` calls. And we never declare any `throws`. Change-Id: I14f62ddef921b6bee90226ea34d1ffa62629bdc3 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-04-261-2/+2
|\ | | | | | | | | | | | | Conflicts: src/plugins/languageclient/languageclientutils.cpp Change-Id: I8d1945f79d93cecee9b22f409bc5f2eefaf6a4cd
| * LanguageClient: fix compile with latest Qt devDavid Schulz2024-04-251-2/+2
| | | | | | | | | | Change-Id: Ifc6b5cfacb1e4e559646304b4ab5889eeb85bf3f Reviewed-by: hjk <hjk@qt.io>
| * Revert "LanguageClient: Allow to define Clients that cannot be added by the ↵Marcus Tillmanns2024-04-182-3/+0
| | | | | | | | | | | | | | | | | | | | | | user" This reverts commit 5b9344e4698233903039fcb9e41227e917a2dd07. Reason for revert: It was meant to go into master Change-Id: If3bf55380ef58e3866e0d552167d4f1c063cc219 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
| * LanguageClient: Allow to define Clients that cannot be added by the userDavid Schulz2024-04-182-0/+3
| | | | | | | | | | | | | | | | | | Used for programmatically created client types which should not be addable by the user. Change-Id: I38ba4f17d5e92415c1e167ecee5780f951818263 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* | Lua: add send message to LSP Client interfaceDavid Schulz2024-04-221-0/+12
| | | | | | | | | | Change-Id: I9fa1d85041e97b5b69ae139e14510027c6097344 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* | Lua: Add lua language client to qbs buildChristian Stenger2024-04-221-0/+14
| | | | | | | | | | Change-Id: Iebd27e0a155529bf0076c7087c7b2b55f9e5ec7b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Lua: Add lsp supportMarcus Tillmanns2024-04-196-0/+552
| | | | | | | | | | Change-Id: I47a1f73a1e1191e116c7cf3b06db5af9e7548fc0 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* | LanguageClient: generate issue pane entries for diagnosticsDavid Schulz2024-04-194-5/+107
| | | | | | | | | | | | | | | | | | | | | | The clang code model already generated issue pane entries for received diagnostics. Move the tracking of these issue pane entries to the generic language client support and also generate entries for other language servers. Fixes: QTCREATORBUG-30549 Change-Id: I29f2ffbf199c3fdc5ca59a670f5033c833b96a49 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | LanguageClient: Allow to define Clients that cannot be added by the userDavid Schulz2024-04-182-0/+3
| | | | | | | | | | | | | | | | | | | | Used for programmatically created client types which should not be addable by the user. Change-Id: I38ba4f17d5e92415c1e167ecee5780f951818263 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> (cherry picked from commit 5b9344e4698233903039fcb9e41227e917a2dd07)
* | LanguageClient: Fix storing settingsMarcus Tillmanns2024-04-181-1/+1
| | | | | | | | | | | | | | Amends: 6294379a1e83efc85d8e293cd852ca720abcf093 Change-Id: I9888ffa39d525edc0e5bf96a7f0a9e1eaad7168b Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* | LanguageClient: Do not remove settings for unregistered client typesDavid Schulz2024-04-161-4/+13
| | | | | | | | | | | | | | ... when applying the settings. Change-Id: I52a49b8b299cfed7eee871dd85f0ddb372f6e849 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* | LanguageClient: Use Layoutbuilder and FormMarcus Tillmanns2024-04-162-45/+53
| | | | | | | | | | | | Change-Id: Id1b94ac4bfd838626a4be0a4912c7811c6cc490d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* | LanguageClient: Fix pre-selection of rename resultsChristian Kandeler2024-04-121-12/+21
| | | | | | | | | | | | | | | | ... for the case of aliased file paths. Task-number: QTCREATORBUG-30546 Change-Id: I2cce03529c45193c20bd3508e4dcb3dc051856fa Reviewed-by: David Schulz <david.schulz@qt.io>
* | Utils: explicitly search the ClientExtras child object by name onlyThiago Macieira2024-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is missing the Q_OBJECT macro, so findChild was searching for a QObject with the appropriate name, then casting to ClientExtras. That means this change is a no-op. But it makes explicit what we meant. Plus, findChild() and findChildren() will enforce that the class they're searching for has the Q_OBJECT macro. Task-number: QTBUG-105023 Change-Id: I5f663c2f9f4149af84fefffd17c024995ef0c1af Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* | LanguageClient: Update call hierarchy on double click on itemChristian Kandeler2024-04-111-7/+5
| | | | | | | | | | | | | | | | | | This seems sensible and is also consistent with how the type hierarchy widget behaves. Fixes: QTCREATORBUG-28843 Change-Id: I2423fda68ab2a9624206b8c93f2490e1a7196173 Reviewed-by: David Schulz <david.schulz@qt.io>
* | TextEditor: remove text editor action handlerDavid Schulz2024-04-091-7/+6
| | | | | | | | | | | | | | | | | | | | Give each editor a context and register editor actions individually for that context. This removes the need to tell the action handler the current editor. Additionally all actions are now available in editor widgets outside of the EditorManager. Change-Id: I0109866b180889762f8bd8aa07874d8d7c55bfa6 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* | LanguageClient: pimpl DiagnosticManagerDavid Schulz2024-03-262-49/+60
| | | | | | | | | | Change-Id: I4b5a2b0fe9818b676d08fd00f33b70366394539d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | TextEditor: handle syntax highlight in batchesDavid Schulz2024-03-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use an elapsed timer in the syntax highlighter to periodically return from the highlight and push a continue highlight to the end of the event loop. This allows the user to interact with the editor in between those batches. If the user modifies the document in between highlighting batches, the area that still needs a rehighlight is increased if needed. This also reverts 62ea85ee6ad15c8e4d9cb5e35b1f10bee3c49ac7 and the related changes. Task-number: QTCREATORBUG-28727 Change-Id: I7c394dbdff658330bb72f3b68b9928980947db75 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-03-221-3/+25
|\| | | | | | | | | | | | | Conflicts: doc/qtcreator/src/overview/creator-only/creator-keyboard-shortcuts.qdoc Change-Id: I2db85da9f4a0593217951313020d71d430986961
| * LanguageClient: Prevent duplicate references due to file aliasingChristian Kandeler2024-03-211-3/+25
| | | | | | | | | | | | | | | | | | This problem has been observed with clangd, but it's probably a good idea to apply the check generally. Note that in the case of renaming, omitting the filtering can lead to file corruption. Task-number: QTCREATORBUG-30546 Change-Id: I007edbae2cba5f59e427ab07e183162df9e99367 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-03-201-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake doc/qtcreator/src/overview/creator-only/creator-keyboard-shortcuts.qdoc qbs/modules/qtc/qtc.qbs src/plugins/remotelinux/linuxdevicetester.cpp Change-Id: I8434e41dcfbb50f6ed032a3e0af1591eb19b79eb
| * LanguageClientSettingsPageWidget: Don't leak QActionsJarek Kobus2024-03-141-1/+1
| | | | | | | | | | | | | | Amends 16decfec672962e96551ca565d342ab20fc454b8 Change-Id: Ib567502944fd5efca9442c88af9f163391e147bd Reviewed-by: David Schulz <david.schulz@qt.io>
* | LSP: Add type hierarchy supportChristian Kandeler2024-03-157-325/+523
| | | | | | | | | | | | | | Fixes: QTCREATORBUG-28116 Change-Id: Ibaed23144f63fa84fa97ae9106d0f0baf8f53118 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-03-141-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/cmakeprojectmanager/cmaketool.cpp src/plugins/python/pythonutils.cpp src/plugins/qtsupport/baseqtversion.cpp Change-Id: Ia3e35c763ff9475d17ad922718b54152209893b8
| * LanguageClientSettingsPageWidget: Don't leak QMenuJarek Kobus2024-03-131-1/+1
| | | | | | | | | | Change-Id: Ia1bfc4aa66e6ed2e2b0e87ae89cf92b1bd5fa97a Reviewed-by: David Schulz <david.schulz@qt.io>
* | LanguageClient: add a tooltip to deprecated items in the call hierarchyDavid Schulz2024-03-131-52/+52
| | | | | | | | | | Change-Id: Ica03cdd06eea755852e6e9e3335ffeb5f8cae499 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | LanguageClient: improve callhierarchy direction itemsDavid Schulz2024-03-121-0/+2
| | | | | | | | | | | | | | | | | | Do not use the icon of the root function for the artificial "Incoming" and "Outgoing" items in the call hierarchy. In the case of deprecated functions this can be a warning icon. Change-Id: Ib75a66296210d4da24208e98efb527b9af37b793 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | LSP: Implement SymbolTag supportChristian Kandeler2024-03-122-0/+7
| | | | | | | | | | | | Change-Id: I6e57d315a5ecd7402c0082df68e083e33dfeab7e Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-03-125-26/+45
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/debugger/gdb/gdbsettings.cpp src/plugins/perfprofiler/perfprofilerruncontrol.cpp Change-Id: I0d5b914f9d9b5499920a5db484ef77af6ae748d5
| * LanguageClient: Suppress a compiler warninghjk2024-03-111-1/+2
| | | | | | | | | | | | | | | | | | warning indentation; statement is not part of the previous 'for' [-Wmisleading-indentation] if (__builtin_expect(!!(clients.removeAll(client) == 0), true)) {} else { ::Utils::writeAssertLocation( "\"" "clients.removeAll(client) == 0""\" in " "/data/dev/creator-out/src/plugins/languageclient/languageclientmanager.cpp" ":" "114"); } do {} while (0 Change-Id: I14297567627801d3a5436abf2df8fec23bff85dd Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| * LanguageClient: improve clangd function hintDavid Schulz2024-03-114-25/+43
| | | | | | | | | | | | | | | | | | | | | | | | Add a Clangd specific function hint model that alwys highlights the current parameter based on the number of commas in front of the cursor position, like the builtin code model. It also correctly closes the proposal after typing the closing parenthesis. Fixes: QTCREATORBUG-26346 Fixes: QTCREATORBUG-30489 Change-Id: I09d3ac6856acfe5e0f206d8c3a96dbb561ea2ce7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-03-061-0/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs src/plugins/cppeditor/cppcodemodelsettings.cpp src/plugins/cppeditor/cppcodemodelsettings.h Change-Id: I54937c39b06897a72a105e4e0a8b5f8a76c38e26
| * LanguageClient: fix assist provider leak on client destructionDavid Schulz2024-03-051-0/+3
| | | | | | | | | | Change-Id: I2d932c2123f48a65be1c6406ed669feda03c93ea Reviewed-by: Christian Stenger <christian.stenger@qt.io>