[PATCH] D143260: [clangd] Add semantic token for labels

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 9 01:11:10 PDT 2023


kadircet added a comment.

(sorry for taking so long to get back to this)

In D143260#4270807 <https://reviews.llvm.org/D143260#4270807>, @nridge wrote:

> In the case of labels (and angle brackets (D139926 <https://reviews.llvm.org/D139926>) and operators (D136594 <https://reviews.llvm.org/D136594>)), the set of users benefiting from them includes presumably "all QtCreator users" (assuming QtCreator assigns a default color to these).

thanks this is useful, i think i know about this reasoning in the previous two reviews but wasn't sure about this one.

> You're right that vscode users don't benefit from them unless they configure `semanticTokenColorCustomizations`; in my mind, this is a reason for us to write some vscode themes, rather than to avoid adding new tokens. (I volunteer to write vscode themes if that helps change your mind.)

Vscode is one that we have control over (similar to Qt creator if that helps reasoning) but I am afraid customizing vscode too much and assessing impact of features with a bias of those customization might hinder usability in the long run (also again custom themes etc. doesn't really scale).

> I'm not sure whether you mean LSP-based editors, but if we're counting editors that had "label" as a semantic token type pre-LSP, and are now looking to maintain that through their switch to LSP, then both Eclipse CDT and (I assume) Qt Creator fall into that category.

Considering that we have added a bunch of token kinds, let me ask you another question then, how many more new token kinds do we expect to have? e.g. if label is the last one sure, but if we plan to have 10 more or if we don't know how many more we would like to have, i think it's better to first come up with a plan and an agreement to make sure we can avoid such discussions with every attempt. does that sound fair?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143260/new/

https://reviews.llvm.org/D143260



More information about the cfe-commits mailing list