Note that we used to encode the information about symbol visibility and
static-ness in the icons, which we can't do anymore, because clangd does
not provide this information.
On the upside, this change likely fixes a ton of bugs, as our own outline
was rather "quirky".
Change-Id: I099f11ec4e3c6f52cd461fb43080bbdde3bed5e5
Reviewed-by: David Schulz <david.schulz@qt.io>
We track the document revision in the client nowadays.
Change-Id: Ia55bc7cd5eaf100fb19953ca71e8de8f43ae3266
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Using the document revision causes issues for some servers.
Task-number: QTCREATORBUG-25766
Change-Id: Ic858e19c6fe39e57c9d3124913887aafee0a3cd0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Otherwise we will have dangling progress bars after a crashed server was
restarted.
Change-Id: I889d201d7cf196623978638db67397203a8f4564
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Mechanical to prepare merging the actual classes.
Adapting #includes.
Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Server name and version are potentially interesting information.
Change-Id: I4fc9a2556d7fd8285fe0024cf0f83baf95112e65
Reviewed-by: David Schulz <david.schulz@qt.io>
... and make use of it in the clangd client to be able tell when
background indexing has finished.
Change-Id: I0f3c6f9646fd66ababd08c12b2f347da5f1a3729
Reviewed-by: David Schulz <david.schulz@qt.io>
... and make use of it in the clangd client.
We want the progress bar for background indexing to have a better title
than the plain (and non-translated) "indexing" that the clangd server
sends.
Change-Id: Ib75eac370e7c22f0c5bd477f4a4c423283b27e1f
Reviewed-by: David Schulz <david.schulz@qt.io>
If the user has enabled clangd (default is off), we start up one instance
per project when it is opened/changed (including build config switches),
and trigger background indexing.
So far, the index is used to provide results for locators and "Find
Usages".
Per-document functionality such as semantic highlighting and completion
is still provided by libclang.
Change-Id: I12532fca1b9c6278baab560e7238cba6189cde9f
Reviewed-by: David Schulz <david.schulz@qt.io>
Only assign documents to a client if the client was started by a
setting. Programatically started clients should handle assigned
documents manually.
Change-Id: I192c4c011a48e0406f267d3cab3c860f740ddad7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Now we search for the key twice in the hash, but the hash shouldn't get
to big and the lookup doesn't happen very often.
Change-Id: I4751a8203321bb4c1ea5092b89593971d736e034
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
We can have multiple widgets per document, so we can have multiple
different cursors for the same document. Tracking document highlights
per widget prevents cancelling a potentially valid request for another
text cursor of another widget.
Change-Id: I800d9be5b44b327351252ab90305b8882efa87bb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Instead of checking recursively every possible object just check the
required keys for an object and validate it on construction or
assignment from json.
This will reduce the implementation effort for protocol extensions and
also reduce the false positives we might get if the protocol gets
updated.
Change-Id: I3df24e62430d2c7575d26c1581e6a9606e7da4c1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If the client was opened for a specific project.
Change-Id: Iafc9f5d46d06e2e656702260f297d6b2b998a431
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Send the workspace change method before the server gets shut down.
Prevents an assert in Client::sendContent.
Change-Id: Iaedc9829379d987aa6f91a87e26d35b64a9f0f55
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The capabilities are not changeable for the user, but only there to
check whether a server is capable of a specific task. This will also
allow us to have more specialized settings widgets for specific servers
like for the java language server without the need to add the
capabilities to each of those special widgets.
Also add the dynamic capabilities to the widget so users have a complete
overview of the capabilities.
Change-Id: I9f2ed6ed11b458f0d4c67be3df632fd810023286
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
All files that match the language filter are opened in the server
currently, no matter whether they belong to the project or not. We want
to track changes to files outside the project, because the project might
depend on those files.
Change-Id: If78142489ad22899f8bd899ae3a7ce3f58618fa3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Starting a client does not need to be done via
LanguageClientManager::startClient anymore but can be done via
Client::start()
Change-Id: I571e96b6ad7d64786a345edf5dbb38208b9a1d12
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Do not remove items of a container while iterating over it
instead revert to old behavior of allocating a temporary.
Broke with cf010911f7.
Change-Id: Ie76974f1e74469f80ee28fb2011d66690dd9e917
Reviewed-by: David Schulz <david.schulz@qt.io>
These options indicate whether a server provides extra messages to track
the status of specific requests.
Change-Id: I3fb78f7fa7144a5a9418b32cb5b33d55b668c484
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The formatting functionality was moved into languageclientformatter.cpp
Change-Id: Ieeafd49c297a854e478a11d4fcb81062b9cfcf19
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The commands provided with the capabilities are not the only allowed
commands, but the ones that can always be executed.
Change-Id: Ie005fafe2e64c334f67809c00623dec2901972c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The temporary containers are needed in some places because the content of the containers change
while iterating over them.
partially reverts: cf010911f7
Change-Id: I4d6df987b9e5382b6b18fa659b1174ca6919a02e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
General messages pane should only be opened on direct user interaction.
Task-number: QTCREATORBUG-24430
Change-Id: I526659110fc67c627cb60fe56e1f709f064667c2
Reviewed-by: David Schulz <david.schulz@qt.io>