<div dir="auto"><div>Couple of thoughts. (Technically I'm out on leave so will let Jan/Ilya review implementation and happy with whatever you decide)</div><div dir="auto"><br></div><div dir="auto">Enabling</div><div dir="auto">- 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 the *client* is aware of it. Roughly, the client capabilities are owned by the client, and the flags are owned by the *user*.</div><div dir="auto">- for simplicity, we could always enable this, unless we really think the message size is a problem, or are worried about conflicts with future LSP versions</div><div dir="auto"><br></div><div dir="auto">Naming</div><div dir="auto">- elsewhere in clangd we settled on calling a "Fix" what clang calls a "FixItHint". The latter is long/awkward/jargon, and often gets shortened to "FixIt" which isn't obviously a noun. The former mostly has its plain English meaning. I'd prefer "fix" in the protocol/flags, for the same reasons.</div><div dir="auto">- obviously feel free to give these any name you prefer in your UI!<br><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Wed, Aug 8, 2018, 00:53 Alex Lorenz via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">arphaman created this revision.<br>
arphaman added reviewers: jkorous, sammccall, ilya-biryukov.<br>
Herald added subscribers: dexonsmith, MaskRay, ioeric.<br>
<br>
This change extends the 'textDocument/publishDiagnostics' notification sent from Clangd to the client. The extension can be enabled using the '-fixit-usage=embed-in-diagnostic' argument. When it's enabled, Clangd sends out the fixits associated with the appropriate diagnostic in the body of the 'publicDiagnostics' notification.<br>
<br>
<br>
Repository:<br>
  rCTE Clang Tools Extra<br>
<br>
<a href="https://reviews.llvm.org/D50415" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D50415</a><br>
<br>
Files:<br>
  clangd/ClangdLSPServer.cpp<br>
  clangd/ClangdLSPServer.h<br>
  clangd/Diagnostics.h<br>
  clangd/fuzzer/ClangdFuzzer.cpp<br>
  clangd/tool/ClangdMain.cpp<br>
  test/clangd/fixits-embed-in-diagnostic.test<br>
</blockquote></div></div></div>