Commit Graph

16 Commits

Author SHA1 Message Date
Cristian Adam
a2273f9f82 LanguageServerProtocol: Compilation fix for MinGW 8.1
Change-Id: I5b7d643e529217a1077777ee542a48a237fa42b3
Reviewed-by: hjk <hjk@qt.io>
2020-05-19 18:02:28 +00:00
hjk
1dc00ac125 LSP: Link fix
Change-Id: I983987e689e0f57f3243b43d64d112a2960263ec
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-19 11:13:32 +00:00
David Schulz
b7382bcf2e LSP: add PrepareRename request to the protocol implementation
Task-number: QTCREATORBUG-21578
Change-Id: I5bd87610d7c49f1e4a09ee1bd2221e4786a1856b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-19 10:11:01 +00:00
Alexis Murzeau
2d5a981b9c LSP: allow non versioned text document in SemanticHighlightingParams
The proposal of SemanticHighlighting uses a versioned text document
identifier, but there is a suggestion to be more coherent with other
existing requests and use text document identifier instead (non versionned).
See here: https://github.com/microsoft/vscode-languageserver-node/pull/367/files#r225879268

The clangd language server implements the non versioned version.

Existing code was returning errors with clangd because
SemanticHighlightingParams::isValid would return false because of the
missing version field.

Change-Id: I1c36151342437adad2405118ca6b303db0936e41
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-11 22:30:49 +00:00
David Schulz
e3c7b72003 LanguageClient: introduce new type for gorgeous formatted errors
Change-Id: Ia76bd768bcb6d33ce66319dddf8cc355a41ffa31
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-12 11:25:01 +00:00
David Schulz
e941e0cac7 LSP: Fix document range formatting request
Change-Id: Ide1de7def5ddabda5536a75d1400d6ea03bab8fd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-09 08:27:58 +00:00
David Schulz
307f1d8e6e LanguageClient: add support for proposed semantic highlight
implements the current proposal for the semantic highlighting
via the language server protocol.
https://github.com/microsoft/vscode-languageserver-node/pull/367

Change-Id: I857d606fcf5c782e0ea8e18e5d098edd26286aed
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-06-21 08:37:11 +00:00
Christian Stenger
5459d3ca72 LanguageServerProtocol: Fix build on macOS
Change-Id: Id13c0c32d03a7c5226d80afafb952fd33b2d608a
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-17 11:36:03 +00:00
David Schulz
c874f07d53 LanguageClient: add hover handler
Change-Id: Iddf30828ef26a157ab935d0abe708087ab123dd6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-17 09:18:41 +00:00
Christian Stenger
90e432aa05 LSP: Avoid unneeded copy inside loop
Change-Id: I7c4d61eda6caf0baacdde01392e2457d54286863
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-08 12:09:08 +00:00
Christian Kandeler
dbf7c9f658 LSP: Fix build
Change-Id: Ic43ce5e2f55dc450fb0a4628dc5de22a4a6f3dbd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-08 10:20:18 +00:00
David Schulz
aa2ad04e04 LSP: add Command and CodeAction support to the language client
Change-Id: I9e86c17b87c6b6aef36bd0ca293d9db40c554aad
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-01-31 14:20:44 +00:00
Alessandro Portale
128a33548b Fix warning: "Missing reference in range-for with non trivial type"
[-Wclazy-range-loop]

Change-Id: I5dcb263c754d423740e7bce3dcb948d52f2dec67
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-16 20:22:56 +00:00
David Schulz
696dedefa1 LSP: add support for hierarchical document symbols
The result of the document symbol request was a flat list of symbols
until version 3.10.0 of the Protocol. The new result type also added
whether a symbol is deprecated and what text should get selected
when a symbol is activated in the IDE UI.

Change-Id: Id30366c44198434c240f3a21b8b237bf6819a425
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-12-03 11:50:13 +00:00
Leena Miettinen
22547c1ca4 LSP: Fix punctuation and capitalization of UI text
Change-Id: Ifc04d979ec7e989ed50d6af23d18819dd91dc0be
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-10-19 11:55:29 +00:00
David Schulz
d61d29cf16 Introduce a basic client for the language server protocol
The language server protocol is used to transport language specific
information needed to efficiently edit source files. For example
completion, go to operations and symbol information. These information
are transferred via JSON-RPC. The complete definition can be found under
https://microsoft.github.io/language-server-protocol/specification.

This language server protocol support consists of two major parts, the
C++ representation of the language server protocol, and the client part
for the communication with an external language server.

The TypeScript definitions of the protocol interfaces are transferred to
C++ classes. Those classes have getter and setter for every interface
value. Optional values from the protocol are represented by
Utils::optional<ValueType>. The JSON objects that are used to transfer
the data between client and server are hidden by a specialized
JsonObject class derived from QJsonObject. Additionally this JsonObject
provides a validity check that is capable of creating a detailed error
message for malformed, or at least unexpected JSON representation of the
protocol.

The client is the interface between Qt Creator and language server
functionality, like completion, diagnostics, document and workspace
synchronization. The base client converts the data that is sent from/to
the server between the raw byte array and the corresponding C++ objects.
The transportat layer is defined in a specialized base client (this
initial change will only support stdio language server). The running
clients are handled inside the language client manager, which is also
used to connect global and exclusive Qt Creator functionality to the
clients.

Task-number: QTCREATORBUG-20284
Change-Id: I8e123e20c3f14ff7055c505319696d5096fe1704
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-03 08:00:46 +00:00