[clangd] Add semantic selection to ClangdLSPServer.
authorUtkarsh Saxena <usx@google.com>
Tue, 24 Sep 2019 13:38:33 +0000 (13:38 +0000)
committerUtkarsh Saxena <usx@google.com>
Tue, 24 Sep 2019 13:38:33 +0000 (13:38 +0000)
commit55925da4c98b3ddac0f28ccc322e8ee52553e022
tree5bd9e806a55853ac2b3b1b89b8e68e1fae250ecc
parent3a415c20ad72f061c38282a49349c6ea31105ff2
[clangd] Add semantic selection to ClangdLSPServer.

Summary:
This adds semantic selection to the LSP Server.
Adds support for serialization of input request and the output reply.
Also adds regression tests for the feature.

Currently we do not support multi cursor.The LSP Server only accepts single position in the request as opposed to many position in the spec.

Spec:
https://github.com/microsoft/language-server-protocol/blob/dbaeumer/3.15/specification.md#textDocument_selectionRange

Reviewers: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D67720

llvm-svn: 372753
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/ClangdLSPServer.h
clang-tools-extra/clangd/Protocol.cpp
clang-tools-extra/clangd/Protocol.h
clang-tools-extra/clangd/test/initialize-params.test
clang-tools-extra/clangd/test/selection-range.test [new file with mode: 0644]