ccls icon indicating copy to clipboard operation
ccls copied to clipboard

Support semantic highlight, introduced in specification 3.16.0

Open MaskRay opened this issue 4 years ago • 4 comments

MaskRay avatar Jun 06 '21 18:06 MaskRay

Should this be closed now that semantic highlighting has been added, or is there still work to be done?

codeinred avatar Aug 24 '21 05:08 codeinred

As far as I can tell, CCLS's current semantic highlighting support is not part of the LSP spec. That's what this PR is for - to add support for the actual LSP semantic tokens spec.

My editor only supports the LSP spec version of semantic highlighting, so I can't use it at all until this is merged. Unless I want to get my hands dirty and build from source...

raiguard avatar Aug 26 '21 00:08 raiguard

It merges successfully and works! (Tested with Emacs and lsp-mode.)

However, the buffer must be changed to see the effects.

AkibAzmain avatar Feb 17 '22 12:02 AkibAzmain

It merges successfully and works...

... but not well. There are several problems:

  • textDocument/semanticToken/range doesn't work with multi-line ranges.
  • Returns tokens for a old version of the file in question (maybe a version from its cache).
  • It declares that textDocument/semanticToken/full/delta is supported, but the method is unusable as textDocument/semanticToken/full doesn't give a resultId.

AkibAzmain avatar Feb 22 '22 10:02 AkibAzmain