This revision was automatically updated to reflect the committed changes.
Closed by commit rL344617: [clangd] Send CodeAction responses to
textDocument/codeAction (LSP 3.8) (authored by sammccall, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
sammccall updated this revision to Diff 169837.
sammccall added a comment.
rebase only
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53213
Files:
clangd/ClangdLSPServer.cpp
clangd/ClangdLSPServer.h
clangd/Protocol.cpp
clangd/Protocol.h
sammccall added inline comments.
Comment at: clangd/Protocol.h:390
+ /// Flattened from codeAction.codeActionLiteralSupport.
+ // FIXME: flatten other properties in this way.
+ bool codeActionLiteralSupport = false;
kadircet wrote:
> sammccall wrote:
> >
kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.
LGTM, thanks!
Comment at: clangd/ClangdLSPServer.cpp:338
+ Command Cmd;
+ if (Action.command && Action.edit)
+return llvm::None;
sammccall wrote:
sammccall added inline comments.
Comment at: clangd/ClangdLSPServer.cpp:338
+ Command Cmd;
+ if (Action.command && Action.edit)
+return llvm::None;
kadircet wrote:
> What would you think about emitting two commands in this case? First the edit
> and then
sammccall updated this revision to Diff 169650.
sammccall marked an inline comment as done.
sammccall added a comment.
update comment
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53213
Files:
clangd/ClangdLSPServer.cpp
clangd/ClangdLSPServer.h
clangd/Protocol.cpp
kadircet added inline comments.
Comment at: clangd/ClangdLSPServer.cpp:338
+ Command Cmd;
+ if (Action.command && Action.edit)
+return llvm::None;
What would you think about emitting two commands in this case? First the edit
and then the command. I
sammccall created this revision.
sammccall added a reviewer: kadircet.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric,
ilya-biryukov.
I don't bother mirroring the full capabilities struct, just parse the
bits we care about. I'll send a new patch to use this approach