[PATCH] D51214: [clangd] Add options to enable/disable fixits and function argument snippets.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 11 03:49:34 PDT 2018


ilya-biryukov added inline comments.


================
Comment at: clangd/tool/ClangdMain.cpp:197
 
+static llvm::cl::opt<bool> IncludeFixIts(
+    "include-fixits",
----------------
sammccall wrote:
> ilya-biryukov wrote:
> > sammccall wrote:
> > > ilya-biryukov wrote:
> > > > I wonder if we should make the `IncludeFixIts` option hidden?
> > > > It currently only works for our YCM integration, VSCode and other clients break.
> > > why would a user want to turn this on or off?
> > Ideally, we want to have it always on.
> > However, all editors interpret the results we return in different ways. This is a temporary option until we can define how text edits are handled by LSP.
> > We filed the bugs, will dig them up on Monday.
> Do we have any more details here? I'm still skeptical that exposing this to end users will help at all, this seems likely that it should be a capability if we do need it.
No updates  on the issue. Here it is:
https://github.com/Microsoft/language-server-protocol/issues/543

Not sure capability is the right thing there, the problem is that additionalTextEdits are underspecified and implemented differently in every client. What we need is a fix in the protocol and fixes in all the clients.

Sadly, this only works in YCM-based completer for now (of all we tested)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51214





More information about the cfe-commits mailing list