ccls icon indicating copy to clipboard operation
ccls copied to clipboard

Semantic highlighting: Constructors Treated As Normal Functions Inside Class Body

Open anthony-S93 opened this issue 3 years ago • 1 comments

Observed behavior

The language server's semantic tokenization won't assign the @constructor token to constructors unless they are outside the class' body.

2022-11-09-003507_813x658_scrot

2022-11-09-003619_747x594_scrot

Expected behavior

Correct semantic tokenization of C++ constructors.

Steps to reproduce

  1. Write a class in C++
  2. Write the class' constructor.
  3. Use the TSHighlightCapturesUnderCursor tool to check the syntax highlight groups assigned to the token.

System information

  • ccls version (git describe --tags --long): 0.20220729-1
  • clang version: 14.0.6-3
  • OS: EndeavourOS Linux x86_64
  • Editor: Neovim
  • Language client (and version): Neovim's built-in LSP client.

anthony-S93 avatar Nov 09 '22 12:11 anthony-S93

  1. ccls does not support LSP semantic token.
  2. The highlight provided by treesitter, not by ccls.

rhcher avatar Dec 22 '22 02:12 rhcher