aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/languageclient/lualanguageclient
Commit message (Collapse)AuthorAgeFilesLines
* LSP: mark some clients as not activatableDavid Schulz2025-05-061-0/+3
| | | | | | | | | | | | | | Differentiate between normal lsp clients that can be used for tasks like completions/outline/highlight and those that just uses the protocol to have a basic document update communication and uses their own messages for specialised tasks like the copilot, coco or ai assistant server. The user should not be able to manually switch to any of those servers as the active server for the current document, so filter those servers in the editor tool bar. Task-number: QTCREATORBUG-32909 Change-Id: Idd5e1c10e613ce986a56defad02a3787aeae85b2 Reviewed-by: Marcus Tillmanns <[email protected]>
* LanguageClient: have one LanguageClient per BuildConfighjk2025-04-291-9/+10
| | | | | | | | Language server behavior does not depend only on the project files but also on Kit configuration and in some cases the actual build. Change-Id: I1c26de62da9e5ee2f2f9e655f23cd2d30cfedd85 Reviewed-by: David Schulz <[email protected]>
* Utils: Move and rename result testing macros from expected.h to result.hhjk2025-04-141-3/+3
| | | | | Change-Id: I65d682054d4774b8937ecce9728a9d2f2e75cc2a Reviewed-by: Jarek Kobus <[email protected]>
* Replace most expected_str by Utils::Resulthjk2025-04-111-10/+10
| | | | | | | | Keep it in Axivion dto, which is generated. Change-Id: I83a12de6234ac7b0218b369875bdc72d25dbadfb Reviewed-by: Eike Ziller <[email protected]> Reviewed-by: Jarek Kobus <[email protected]>
* ExtensionSystem: Add Type="Script" to configure dependency resolutionMarcus Tillmanns2025-03-251-1/+1
| | | | | | | | | | | We need some hint in the plugins metadata that tells us whether the plugin is a script or a c++ plugin. Otherwise we cannot tell by the metadata alone how to resolve dependencies. This is necessary for the ExtensionBrowser which does not have any other way to detect the type of an extension. Change-Id: I61eb8f91fb079cf59cc8470f95a13c9c6fa75634 Reviewed-by: Eike Ziller <[email protected]>
* Avoid potential detach of non-const Qt containers in range-loops 1/2Alessandro Portale2025-03-211-1/+1
| | | | | | | By making the containers const. Change-Id: I3095d7c817bd8a9cc40184aba144d617c6071f97 Reviewed-by: hjk <[email protected]>
* Lua: Use string_view literals as keys when calling get() and get_or()Marcus Tillmanns2025-02-211-10/+12
| | | | | | | | | | | A bug in gcc (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438) creates a lot of warnings when using get_or with a simple "" string. To workaround, we create a string_view literal in place to workaround it. Change-Id: I3167c8f9c525a9b265a2c69a7ddadad0fe13ea71 Reviewed-by: hjk <[email protected]>
* Lua: Return request id and enable cancel notification for LSP ClientLukasz Papierkowski2025-02-061-2/+14
| | | | | Change-Id: If59fb64acbfc56a0427b21597945ceace22897aa Reviewed-by: Marcus Tillmanns <[email protected]>
* LSP: Notify custom handlers also for non-custom methodsLukasz Papierkowski2025-01-241-1/+11
| | | | | Change-Id: I45a93a5971869b551330f36bd20ea9092854a83a Reviewed-by: David Schulz <[email protected]>
* Merge remote-tracking branch 'origin/15.0'Eike Ziller2024-12-051-1/+11
|\ | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs src/plugins/languageclient/languageclientmanager.cpp src/plugins/languageclient/languageclientmanager.h Change-Id: I5d705abb1dd6b67e7c51c4f9151bf4fe3213004f
| * LuaLS: Write settings after applyingMarcus Tillmanns2024-12-041-2/+4
| | | | | | | | | | Change-Id: I87cf48eee3c8df4481a672c31e6adf58ed1ec155 Reviewed-by: David Schulz <[email protected]>
| * Lua LS: Use applySettings with specific settingsMarcus Tillmanns2024-12-031-1/+9
| | | | | | | | | | | | | | | | LanguageClientManager::applySettings() does not know when to apply custom settings so we make sure that we explicitly apply our own. Change-Id: I316e94d0fc50eafe59ca83142b367dd07fa5b353 Reviewed-by: David Schulz <[email protected]>
* | Merge remote-tracking branch 'origin/15.0'Eike Ziller2024-12-021-1/+0
|\| | | | | | | Change-Id: I13e6beb4741be5aa79b2798aa6b674e45ad109f2
| * Fix: DidOpen msg sometimes not sent after client restart by settingsLukasz Papierkowski2024-11-261-1/+0
| | | | | | | | | | Change-Id: I8410e29fc66202dc1aca17f223bdb6ffb7e73ec8 Reviewed-by: Marcus Tillmanns <[email protected]>
* | Plugins: Improve display names of pluginsAlessandro Portale2024-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | This introduces a field "DisplayName" to PluginSpec and the plugin spec json files. If present in the spec, PluginSpec::displayName returns it, or otherways falls back to more established fields. Fixes: QTCREATORBUG-31761 Change-Id: I4f4c4f3e33b17dfb2ec63644b1f50b3b9c6c024a Reviewed-by: Leena Miettinen <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
* | Merge remote-tracking branch 'origin/15.0'Eike Ziller2024-11-141-1/+2
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/android/androiddeployqtstep.cpp src/plugins/debugger/debuggerdialogs.cpp src/plugins/projectexplorer/kitaspect.cpp Change-Id: Iebc1d7a38db4c228282c04c63d7f11ee76072a06
| * LuaLS: filter out stale clientsAndrii Batyiev2024-11-131-2/+5
| | | | | | | | | | | | | | | | | | | | Clients on the list could be already in shutdown phase, so filter them out. Change-Id: I30768f63a89418279af02076550f408749ad04a9 Reviewed-by: Marcus Tillmanns <[email protected]> (cherry picked from commit ee0779ac80f02bebb50e27ee660c5b02a426a30d) Reviewed-by: hjk <[email protected]>
| * LuaLS: Fix applying async init optionsMarcus Tillmanns2024-11-111-0/+1
| | | | | | | | | | | | | | | | | | Just calling optionsChanged is not enough, we also need to instruct the LanguageClientManager to apply the new settings. Change-Id: I84bc930702b85463d753778ba35348c9a4c95bad Reviewed-by: David Schulz <[email protected]>
| * LuaLS: Use main_tableMarcus Tillmanns2024-11-081-1/+1
| | | | | | | | | | Change-Id: I57b482c4ed9e7694ed1b8faa2de9d8f456a9b864 Reviewed-by: hjk <[email protected]>
* | LanguageClient: Change toMap() signature of settings classeshjk2024-11-111-5/+4
| | | | | | | | | | | | | | | | ... from 'Store toMap() const' to 'voud toMap(Store &map)' to make it more similar to AspectContainers. Change-Id: Ia8a10d97513b54321c0bac5caa76b7a589394a78 Reviewed-by: David Schulz <[email protected]>
* | LuaLS: filter out stale clientsAndrii Batyiev2024-11-081-2/+5
| | | | | | | | | | | | | | | | Clients on the list could be already in shutdown phase, so filter them out. Change-Id: I30768f63a89418279af02076550f408749ad04a9 Reviewed-by: Marcus Tillmanns <[email protected]>
* | Merge remote-tracking branch 'origin/15.0'Orgad Shaneh2024-11-071-6/+6
|\| | | | | | | Change-Id: Icd59b4850b51b6cef1753e0ba638ac25d07e6e99
| * Lua: Fix for client crash on callback callArtur Twardy2024-11-051-6/+6
| | | | | | | | | | Change-Id: Idd2ca77b050aa22c3c34d1fef45fac8e960c4401 Reviewed-by: Marcus Tillmanns <[email protected]>
* | Avoid std::optional::valueEike Ziller2024-11-041-1/+1
|/ | | | | | | | | | | | | | It - checks existence of the value again, which we already do before - it throws, which static analyzers don't like because we don't catch or declare - opt.value().something is doubly wrong because operator-> does it better Use operator* and operator-> instead. Change-Id: Icfddebcadb4bba35a59876cee705393d03509129 Reviewed-by: hjk <[email protected]>
* Plugins: Restore more original plugin namesAlessandro Portale2024-10-171-1/+1
| | | | | | | Extisting plugins/wizards might depend on the original name. Change-Id: Ic0626e05a9fd9f045d1a105a144ebe2a906d2eb0 Reviewed-by: Marcus Tillmanns <[email protected]>
* Lua LSP: Add parameter for async optionsMarcus Tillmanns2024-10-081-0/+33
| | | | | | | | | Allows using async code to create the options of a language client. This is useful for instance if you need to get values from a SecrectAspect Change-Id: Ica23b7f0df00bff3af7520524905a59ceb5b8e8c Reviewed-by: David Schulz <[email protected]>
* Unify copyright string and remove yearEike Ziller2024-09-261-1/+1
| | | | | | | | | | | The year is not needed and requires us to update it manually each year. So just remove it. Centralize it in the branding file to avoid changes to be done at lots of places (About dialog, plugin specs, app info plist & rc, docs, ...) in the future. Task-number: QTCREATORBUG-30432 Change-Id: Ia421924c19a1331b121e765bcea137920025598d Reviewed-by: Marcus Tillmanns <[email protected]>
* Lua: Bump version number to 15Marcus Tillmanns2024-09-101-1/+1
| | | | | | | | Also adds exception if LuaCompatibleVersion is higher than spec version (during development) Change-Id: I39ab3b19e438c4c1691a2db18d884b9dbd417b19 Reviewed-by: Marcus Tillmanns <[email protected]>
* ExtensionSystem: Add PluginId and VendorIdMarcus Tillmanns2024-09-021-1/+3
| | | | | Change-Id: I4f47f95e1f4ff4af73c2b81320087b4592007993 Reviewed-by: Alessandro Portale <[email protected]>
* LuaLS: Improve error reportingMarcus Tillmanns2024-08-191-15/+14
| | | | | | | | | | | Changes LSP.Client:documentVersion() and LSP.Client:hostPathToServerUri() to return ok and error message in case of errors. Also fixes the binding to take a self parameter so it fits to the function documentation. Change-Id: I605b7bacba2822c3efd5291d1f7bacf1ecb863d5 Reviewed-by: David Schulz <[email protected]>
* LanguageClient: Add option to hide settingsMarcus Tillmanns2024-08-151-0/+4
| | | | | Change-Id: Iefc9398bdc4ffcf498eb66a702994e9e143beb74 Reviewed-by: David Schulz <[email protected]>
* Lua: Introduce LuaCompatibleVersionMarcus Tillmanns2024-07-301-1/+2
| | | | | | | | | The new field "LuaCompatibleVersion" is required when a lua plugin depends on a C++ plugin. A dependency will be fulfilled if: "LuaCompatibleVersion <= dependency.version <= Version" Change-Id: I61466055a56e20abbb1fa5f73a5735a0e3a4c471 Reviewed-by: Eike Ziller <[email protected]>
* Lua: Dissolve LuaEngine classhjk2024-07-261-11/+11
| | | | | | | It was mostly used as namespace. Change-Id: Ice6cdd1581d7dd70b09f6d82891b874a206a1ca0 Reviewed-by: Marcus Tillmanns <[email protected]>
* LuaLSP: Make init Options dynamicMarcus Tillmanns2024-07-241-18/+54
| | | | | | | Allows a LSP plugin to dynamically configure the initializationOptions Change-Id: Idc5d6526a732512b2e4e7394fb1c8b5749cde25d Reviewed-by: Christian Stenger <[email protected]>
* Lua: Fix language clientLukasz Papierkowski2024-07-231-2/+3
| | | | | | Change-Id: If87adc59e997626ad4ca77a75802f7c068cf26e5 Reviewed-by: Marcus Tillmanns <[email protected]> Reviewed-by: <[email protected]>
* LuaLS: Add sendMessageForDocumentMarcus Tillmanns2024-07-191-20/+83
| | | | | | | | | | | | The original "sendMessage" function sends a message to each client. To send a message to a specific Language client the sendMessageForDocument and sendMessageForDocumentWithId functions are added. As a fix the way that settings are copied into the Lua wrapper and the id used to find clients was changed. Change-Id: I577ee1f9da983c80e4ef00b8e86ccb2bfe369314 Reviewed-by: hjk <[email protected]>
* LUA: Client and Utils bindings updateLukasz Papierkowski2024-07-191-11/+80
| | | | | | Change-Id: Icad01906aa9f9405004ce342399fcb42354e77df Reviewed-by: Marcus Tillmanns <[email protected]> Reviewed-by: <[email protected]>
* LuaLanguageClient: Dont store settings pointerMarcus Tillmanns2024-07-161-7/+2
| | | | | | | | The settings can be deleted by the LanguageClientManager so we just use the settings id instead. Change-Id: I03f0d4184a12c69f6cd8c74705ab8e1d01b15ec6 Reviewed-by: David Schulz <[email protected]>
* Utils: Make Aspect::addToLayout() consthjk2024-07-081-1/+1
| | | | | | | | | | | It's conceptionally const, and would be useful to use as such, but the current implementations often modifie mutable state. To ease the transition pain, rename the previous non-const version to addToLayoutImpl() and call it after const_cast'ing. Change-Id: Ic8ca38e40f5df69c3d11121f96ea37648cf4feb7 Reviewed-by: Marcus Tillmanns <[email protected]>
* Plugin meta data: Add full stop to descriptionsEike Ziller2024-06-281-1/+1
| | | | | | | | | Where they were missing. The text is shown as a paragraph in the extension manager. Change-Id: I6e15c89fe4023b222e9c476f4312e13fcb0905c0 Reviewed-by: Leena Miettinen <[email protected]> Reviewed-by: Alessandro Portale <[email protected]>
* LuaLanguageClient: Fix crash on exitMarcus Tillmanns2024-06-251-17/+11
| | | | | Change-Id: I2f70d0b1586bc2bfbb27ea1513313e5c6ca32754 Reviewed-by: David Schulz <[email protected]>
* LuaLC: Register Settings typeMarcus Tillmanns2024-06-121-0/+7
| | | | | Change-Id: I58b3817e83c598b62e0ae5e61c21043d2c3290a7 Reviewed-by: David Schulz <[email protected]>
* LuaLSC: Fix crash on exitMarcus Tillmanns2024-06-101-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 <[email protected]>
* PluginSpecs: Change URLs from http:// to https://Alessandro Portale2024-05-281-1/+1
| | | | | | | | | | 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 <[email protected]>
* Use LayoutBuilder V2hjk2024-05-271-5/+4
| | | | | | | | | | | | 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 <[email protected]>
* Lua: Add Install moduleMarcus Tillmanns2024-05-241-2/+3
| | | | | | | Allows plugins to install packages they might need. Change-Id: I4948dd0a6568e093fc35e4486d2e2a084090e103 Reviewed-by: David Schulz <[email protected]>
* Lua LSP: Add callback if server fails to startMarcus Tillmanns2024-05-161-18/+55
| | | | | | Change-Id: I422baeffff96cf56a110cbf74716352c9104c5ef Reviewed-by: David Schulz <[email protected]> Reviewed-by: <[email protected]>
* Lua: add send message to LSP Client interfaceDavid Schulz2024-04-221-0/+12
| | | | | Change-Id: I9fa1d85041e97b5b69ae139e14510027c6097344 Reviewed-by: Marcus Tillmanns <[email protected]>
* Lua: Add lua language client to qbs buildChristian Stenger2024-04-221-0/+14
| | | | | Change-Id: Iebd27e0a155529bf0076c7087c7b2b55f9e5ec7b Reviewed-by: Christian Kandeler <[email protected]>
* Lua: Add lsp supportMarcus Tillmanns2024-04-193-0/+527
Change-Id: I47a1f73a1e1191e116c7cf3b06db5af9e7548fc0 Reviewed-by: Marcus Tillmanns <[email protected]>