This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Add command-line option to suppress the space and the circular dot prepended in a completion label.
ClosedPublic

Authored by rwols on Jul 29 2018, 11:23 AM.

Details

Summary

Some LSP clients (e.g. Sublime Text) assume that the label and the completion trigger have a common
prefix. This assumption is broken by prepending a space or dot in front of the label, depending
on wether we're inserting an #include <...> text edit or not. This change allows to clear the
prepended characters in the label.

Event Timeline

rwols created this revision.Jul 29 2018, 11:23 AM
sammccall accepted this revision.Jul 29 2018, 11:39 AM

Makes sense, thanks!

clangd/tool/ClangdMain.cpp
161

Please invert the sense of this to avoid a double negative: "header-insert-decorators" with default true.

Consider insert->insertion, because currently is not clear whether to read as (header (insert decorators)) or as ((header insert) decorators).

This revision is now accepted and ready to land.Jul 29 2018, 11:39 AM
rwols updated this revision to Diff 157894.Jul 29 2018, 12:08 PM

Avoid double negative for command line option

rwols marked an inline comment as done.Jul 29 2018, 12:08 PM
rwols closed this revision.Jul 29 2018, 12:21 PM

Oh... I should have used arc land instead of svn commit. Here's the commit: https://reviews.llvm.org/rCTE338223