[clangd-dev] Syntax highlighting of keywords

Dmitri Makarov via clangd-dev clangd-dev at lists.llvm.org
Mon Oct 28 01:53:15 PDT 2019


Why is this a problem if clangd provides extra information, like keywords
highlighting?  Couldn't IDEs/Editors (any LSP clients) ignore the
information, if they have more efficient ways to highlight the keywords?
For consistency and completeness, it seems worth providing the information.

Regards,

Dmitri


On Mon, Oct 28, 2019 at 9:12 AM Ilya Biryukov via clangd-dev <
clangd-dev at lists.llvm.org> wrote:

> We're talking exclusively about semantic highlightings (e.g. the
> highlightings that require full semantic analysis).
> Clangd *could *potentially provide keyword highlightings as well, with
> different latency trade-offs.
>
> I still feel like getting it right in the editors shouldn't be too big of
> a problem, although some things like raw string literals obviously pose a
> challenge.
> Doing it in the editor provides a much more robust experience, e.g.
> imagine losing *all *syntax highlighting because clangd crashed.
>
>
> On Sat, Oct 26, 2019 at 2:39 AM Kirill Bobyrev <kbobyrev.lists at gmail.com>
> wrote:
>
>> Just checking: are we talking about primitive highlighting (i.e. keywords
>> only)? I had several problems with C++ keywords from new language standards
>> because they are not in the default syntax files of (Neo)Vim and
>> third-party plugins often miss some of the words. I think it makes sense to
>> have Clangd as the “universal provider” of the updated keyword list because
>> then I don’t have to patch Vim plugins and/or wait for the default syntax
>> files to get updated.
>>
>> > On 25 Oct 2019, at 10:59, Ilya Biryukov via clangd-dev <
>> clangd-dev at lists.llvm.org> wrote:
>> >
>> > Hi clangd-dev,
>> >
>> > I was wondering whether there's any value in the highlighting for
>> "primitive" types being added on keywords like 'void', 'int', etc?
>> >
>> > - Any editor handles those with default syntax highlight.
>> > - It's trivial and does not require actual semantic knowledge.
>> >
>> > With that in mind, I wonder whether we should drop this completely and
>> just let the editors handle the keywords?
>>
>> > What do people think?
>> >
>> > --
>> > Regards,
>> > Ilya Biryukov
>> > _______________________________________________
>> > clangd-dev mailing list
>> > clangd-dev at lists.llvm.org
>> > https://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev
>>
>>
>
> --
> Regards,
> Ilya Biryukov
> _______________________________________________
> clangd-dev mailing list
> clangd-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/clangd-dev/attachments/20191028/532e50b5/attachment.html>


More information about the clangd-dev mailing list