This revision was automatically updated to reflect the committed changes.
arphaman marked an inline comment as done.
Closed by commit rCTE339454: [clangd] extend the publishDiagnostics response to
send back fixits to the (authored by arphaman, committed by ).
Changed prior to commit:
https://re
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM with a small NIT.
Comment at: clangd/ClangdLSPServer.cpp:507
+}
+LSPDiag["clangd.fixes"] = std::move(ClangdFixes);
+ }
---
arphaman updated this revision to Diff 160007.
arphaman marked an inline comment as done.
arphaman added a comment.
remove parameter.
https://reviews.llvm.org/D50415
Files:
clangd/ClangdLSPServer.cpp
clangd/ClangdLSPServer.h
clangd/Diagnostics.h
clangd/Protocol.cpp
clangd/Protocol.h
ilya-biryukov added inline comments.
Comment at: clangd/ClangdLSPServer.cpp:441
const clangd::CodeCompleteOptions &CCOpts,
+ const ClangdDiagnosticOptions &DiagOpts,
llvm::Optional
arphaman updated this revision to Diff 159760.
arphaman added a comment.
- Client now can request the fixes using a
'clientCapabilities/textDocument/publishDiagnostics' extension.
- Use 'Fixes' instead of 'Fixits' in code.
https://reviews.llvm.org/D50415
Files:
clangd/ClangdLSPServer.cpp
c
ilya-biryukov added a comment.
+1 Sam's suggestion of configuring this during initial LSP handshake, rather
than as a command-line flag.
We could put it into `ClientCapabilities` or into `initializationOptions`. The
latter has type 'any' in LSP, so it seems to be most in-line with the protocol
sammccall added subscribers: ilya-biryukov, jkorous.
sammccall added a comment.
Couple of thoughts. (Technically I'm out on leave so will let Jan/Ilya
review implementation and happy with whatever you decide)
Enabling
- negotiating LSP extensions is probably better done in the "capabilities"
me
Couple of thoughts. (Technically I'm out on leave so will let Jan/Ilya
review implementation and happy with whatever you decide)
Enabling
- negotiating LSP extensions is probably better done in the "capabilities"
message exchange than as a command-line flag. Generally, we want this
extension on if
arphaman created this revision.
arphaman added reviewers: jkorous, sammccall, ilya-biryukov.
Herald added subscribers: dexonsmith, MaskRay, ioeric.
This change extends the 'textDocument/publishDiagnostics' notification sent
from Clangd to the client. The extension can be enabled using the
'-fixi