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

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 7 18:43:26 PDT 2018


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"

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*.

- 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

Naming

- 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.

- obviously feel free to give these any name you prefer in your UI!


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D50415





More information about the cfe-commits mailing list