[PATCH] D50415: [clangd] extend the publishDiagnostics response to send back fixits to the client directly as well (if requested)

2018-08-10 Thread Alex Lorenz via Phabricator via cfe-commits
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

[PATCH] D50415: [clangd] extend the publishDiagnostics response to send back fixits to the client directly as well (if requested)

2018-08-10 Thread Ilya Biryukov via Phabricator via cfe-commits
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); + } ---

[PATCH] D50415: [clangd] extend the publishDiagnostics response to send back fixits to the client directly as well (if requested)

2018-08-09 Thread Alex Lorenz via Phabricator via cfe-commits
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

[PATCH] D50415: [clangd] extend the publishDiagnostics response to send back fixits to the client directly as well (if requested)

2018-08-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:441 const clangd::CodeCompleteOptions &CCOpts, + const ClangdDiagnosticOptions &DiagOpts, llvm::Optional

[PATCH] D50415: [clangd] extend the publishDiagnostics response to send back fixits to the client directly as well (if requested)

2018-08-08 Thread Alex Lorenz via Phabricator via cfe-commits
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

[PATCH] D50415: [clangd] extend the publishDiagnostics response to send back fixits to the client directly as well (if requested)

2018-08-08 Thread Ilya Biryukov via Phabricator via cfe-commits
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

[PATCH] D50415: [clangd] extend the publishDiagnostics response to send back fixits to the client directly as well (if requested)

2018-08-07 Thread Sam McCall via Phabricator via cfe-commits
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

Re: [PATCH] D50415: [clangd] extend the publishDiagnostics response to send back fixits to the client directly as well (if requested)

2018-08-07 Thread Sam McCall via cfe-commits
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

[PATCH] D50415: [clangd] extend the publishDiagnostics response to send back fixits to the client directly as well (if requested)

2018-08-07 Thread Alex Lorenz via Phabricator via cfe-commits
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