[PATCH] D67650: Add SemanticRanges to Clangd server.

UTKARSH SAXENA via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 17 02:53:25 PDT 2019


usaxena95 created this revision.
usaxena95 added a reviewer: hokein.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.

Adds Semantic Ranges capabilities to Clangd server.
Also adds tests for running it via clangd server.

This differs from the LSP spec as the spec needs this to be evaluated on multiple 'pos' and the expected output is an list of list of semantic ranges.
This is majorly for multi cursor and assuming this is a rare thing, we don't want to optimize make things complicated just for this. 
This should be done in the LSP level by queueing one request per 'pos' in the input.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67650

Files:
  clang-tools-extra/clangd/ClangdServer.cpp
  clang-tools-extra/clangd/ClangdServer.h
  clang-tools-extra/clangd/unittests/SemanticSelectionTests.cpp
  clang-tools-extra/clangd/unittests/SyncAPI.cpp
  clang-tools-extra/clangd/unittests/SyncAPI.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67650.220461.patch
Type: text/x-patch
Size: 5775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190917/2e9fe4da/attachment-0001.bin>


More information about the cfe-commits mailing list