Do not clear open documents but disconnect and deactivate them,
so they can be correctly reopened once the server is restarted.
Change-Id: I0f61a5461c020865e61d9808e8c645ea842f64ad
Fixes: QTCREATORBUG-23648
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Return a link to the word under cursor when the target should not
get resolved. This results in a highlight of the text the mouse cursor
is positioned on when pressing ctrl to follow a link.
Change-Id: Iaf1ba289644ed3e3fc062b418dd2fa3bfa8da6ad
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Instead of sending the link request to all reachable server send it only
to the server that is currently used to handle this document.
Change-Id: I27a8d0e4573f734baa2931a0af771e60665a4532
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
By always removing them from the list of opened documents also for
uninitialized clients. Fixes crash when closing creator before the
initialize response of a language server was handled.
Change-Id: I81fb15d8d9d7bf47300a6eac373ef9db04387bd4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Show an editor info bar entry displaying that the language server for
the current python is disabled and a button to quickly enable the pyls.
Change-Id: I3adb2e7cbfb1a32e35413b0b06dfbe66a0b214af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This adds the possibility to configure language servers
from other plugins.
Change-Id: I33c7d637ddd73dcfc0d02c366b8b9749ac1c2b98
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
After settings are applied in the manager make sure to assign all
open documents to the newly created clients if the document filter
accepts them.
Change-Id: I30e06e37bc4fde0bc7bab34a2de564a7df043edf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
open a document in all clients supporting the document, but have just
one client that provide functionality like highlights, completions, and
find usages.
Change-Id: I6bd72eb022005ed643fefd1da139d482f4dd5279
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Also show a menu when triggering the language client toolbar button that
allows you to manage and switch between different language clients. The
default language server used to open a specific file type is determined
by the order of the servers inside the settings.
Change-Id: Ib1b21dd2c04d4559f538705e6ba229af043e02ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Some server like rust or haskell require a project at server startup.
Add option that postpones the server start until we can assign a project
to an open file.
Change-Id: Iaa475289e833b27a730a90ea228f5d85ecc30338
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
In preparation to have relationship between clients, settings and
project to one another in the manager.
Change-Id: I00ae15abe03c54b4a58e429d67d6ff939662cce6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The server can request the list of opened projects via the
"workspace/workspaceFolders" request. Add a creator response for
this request.
Change-Id: Ieadf604aeb920da28f085b8441e6f9af1f540fd3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Until now all servers where startet on creator startup. Change this
default to start server when first file that matches the configured
filter is opened. Additionally add an option that restores the old
behavior of always on servers.
Change-Id: I595e0ede1cf136cc803181377155bcd58ca1a83c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... and not just the first one returned by
BaseTextEditor::textEditorForDocument
Change-Id: I39e9271b3a2b6c0f131a5ce77959a8d57e462397
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... not just the first returned by BaseTextEditor::textEditorForDocument
Change-Id: I262cd68e6dea59aa23be718fb85d2ae68c40ef39
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Makes sure that the same document is not twice reported as opened to the
language server.
Change-Id: I348b0f4d8f9162e6ba73a4e3292abce146935eca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If a shutdown is in progress we need an immediately delete
of the client to avoid accessing an already deleted
TextMarkRegistry instance when deleteLater() is triggered
too late.
Change-Id: I274f40532cec0bfc026322a633441a1856cb848c
Reviewed-by: David Schulz <david.schulz@qt.io>
Diagnostics are “owned” by the server so it is the server’s
responsibility to clear them if necessary. So do not delete the
corresponding text mark after a file was closed, because the server does
not have to resend the diagnostics when the file is reopened. Only
delete text marks when they are replaced or when the client is deleted
or reset.
Change-Id: Ief821c7ec401f4c52ee30d99f8dec47dcd6f1c98
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Since BaseClient isn't part of an inheritance hirarchie any more the
Base doesn't make sense now.
Change-Id: I69200b19a22e5a04079e5289a02234af4f56a1bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The client got indirectly deleted from the manager while still in the
parsing output function during the last restart attempt. Fixing it by
freeing the client via deleteLater.
Change-Id: I2539a8b96b5568dc2ae15a6bfe4f2ab02c280f67
Fixes: QTCREATORBUG-21635
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Instead of always defining the templates of the response type by hand
add a using construct in the Request where all the template types are
known.
Change-Id: I0dc00bd9aef9c37c9454e35aca200a30fcf2ebda
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
A message is already printed after an unexpected finish with restart attempt.
Without this last message it looks like Qt Creator still tries to restart
the server.
Change-Id: I47dd3e768d061a7d039ee3f125368c6e166ebf81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>