[PATCH] D65263: [clangd] a prototype for triggering rename after extracting.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 25 01:03:42 PDT 2019


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

This is a prototype patch.

LSP doesn't have support for asking user input currently. Other language
servers (Typescript, Java) will trigger rename after running extract
action, we do the same in clangd (to provide consistent behavior across
languages)

but this requires some LSP extensions:

- ClientCommand which will be executed in LSP client side;
- we add a client command to the result of `applyEdit` request;
- LSP client support;


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65263

Files:
  clang-tools-extra/clangd/ClangdLSPServer.cpp
  clang-tools-extra/clangd/Protocol.cpp
  clang-tools-extra/clangd/Protocol.h
  clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts
  clang-tools-extra/clangd/refactor/Tweak.h
  clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65263.211683.patch
Type: text/x-patch
Size: 8474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190725/21933afb/attachment-0001.bin>


More information about the cfe-commits mailing list