mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-29 11:01:57 +00:00
Fix semantic highlighting regressions from switch from ClangSymbolKind to lsSymbolKind (fixes #469)
This commit is contained in:
parent
d4c49730fd
commit
9f4b30ca8c
@ -118,7 +118,7 @@ lsSymbolKind GetSymbolKind(CXIdxEntityKind kind) {
|
||||
return lsSymbolKind::Struct;
|
||||
case CXIdxEntity_CXXTypeAlias:
|
||||
case CXIdxEntity_Typedef:
|
||||
return lsSymbolKind::TypeParameter;
|
||||
return lsSymbolKind::TypeAlias;
|
||||
|
||||
case CXIdxEntity_Function:
|
||||
return lsSymbolKind::Function;
|
||||
@ -1310,7 +1310,7 @@ ClangCursor::VisitResult TemplateVisitor(ClangCursor cursor,
|
||||
ref_var->def.extent =
|
||||
SetUse(db, ref_cursor.get_extent(), lex_parent, Role::None);
|
||||
ref_var = db->Resolve(ref_var_id);
|
||||
ref_var->def.kind = lsSymbolKind::Parameter;
|
||||
ref_var->def.kind = lsSymbolKind::TypeParameter;
|
||||
SetVarDetail(ref_var, ref_cursor.get_spell_name(), ref_cursor,
|
||||
nullptr, true, db, param);
|
||||
|
||||
|
@ -107,12 +107,16 @@ enum class lsSymbolKind : uint8_t {
|
||||
Struct = 23,
|
||||
Event = 24,
|
||||
Operator = 25,
|
||||
|
||||
// For C++, this is interpreted as "template parameter" (including
|
||||
// non-type template parameters).
|
||||
TypeParameter = 26,
|
||||
|
||||
// cquery extensions
|
||||
// See also https://github.com/Microsoft/language-server-protocol/issues/344
|
||||
// for new SymbolKind clang/Index/IndexSymbol.h clang::index::SymbolKind
|
||||
Parameter = 13,
|
||||
TypeAlias = 252,
|
||||
Parameter = 253,
|
||||
StaticMethod = 254,
|
||||
Macro = 255,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user