222 references to SemanticTokenTypes
Microsoft.CodeAnalysis.LanguageServer.Protocol (24)
Handler\SemanticTokens\SemanticTokensSchema.cs (24)
25[ClassificationTypeNames.Comment] = SemanticTokenTypes.Comment, 26[ClassificationTypeNames.Identifier] = SemanticTokenTypes.Variable, 27[ClassificationTypeNames.Keyword] = SemanticTokenTypes.Keyword, 28[ClassificationTypeNames.NumericLiteral] = SemanticTokenTypes.Number, 29[ClassificationTypeNames.Operator] = SemanticTokenTypes.Operator, 30[ClassificationTypeNames.StringLiteral] = SemanticTokenTypes.String, 40[ClassificationTypeNames.ClassName] = SemanticTokenTypes.Class, 41[ClassificationTypeNames.StructName] = SemanticTokenTypes.Struct, 42[ClassificationTypeNames.NamespaceName] = SemanticTokenTypes.Namespace, 43[ClassificationTypeNames.EnumName] = SemanticTokenTypes.Enum, 44[ClassificationTypeNames.InterfaceName] = SemanticTokenTypes.Interface, 45[ClassificationTypeNames.TypeParameterName] = SemanticTokenTypes.TypeParameter, 46[ClassificationTypeNames.ParameterName] = SemanticTokenTypes.Parameter, 47[ClassificationTypeNames.LocalName] = SemanticTokenTypes.Variable, 48[ClassificationTypeNames.PropertyName] = SemanticTokenTypes.Property, 49[ClassificationTypeNames.MethodName] = SemanticTokenTypes.Method, 50[ClassificationTypeNames.EnumMemberName] = SemanticTokenTypes.EnumMember, 51[ClassificationTypeNames.EventName] = SemanticTokenTypes.Event, 52[ClassificationTypeNames.PreprocessorKeyword] = SemanticTokenTypes.Macro, 91/// <see cref="SemanticTokenTypes"/> or a custom token name. 102/// Equivalent to see <see cref="SemanticTokenTypes.AllTypes"/> combined with the remaining custom token names from <see cref="TokenTypeMap"/> 112.Where(tokenType => !SemanticTokenTypes.AllTypes.Contains(tokenType)) 116AllTokenTypes = [.. SemanticTokenTypes.AllTypes, .. customTokenTypes]; 120foreach (var lspTokenType in SemanticTokenTypes.AllTypes)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (198)
SemanticTokens\SemanticTokensFullTests.cs (7)
420, 0, 10, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '// Comment' 431, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 440, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 550, 0, 10, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '// Comment' 561, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 570, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 580, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], (int)TokenModifiers.Static, // 'C'
SemanticTokens\SemanticTokensRangeTests.cs (191)
460, 0, 10, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '// Comment' 471, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 480, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 590, 0, 10, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '// Comment' 601, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 610, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 620, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], (int)TokenModifiers.Static, // 'C' 1400, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 1410, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Number], 0, // '1' 1450, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 15312, 0, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 1540, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'z' 1550, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 1560, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Number], 0, // '1' 15816, 3, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 1590, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 1600, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 1941, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 1950, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 2061, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 2070, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 2080, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], (int)TokenModifiers.Static, // 'C' 2460, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 2490, 2, 6, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '/* one' 2502, 0, 3, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'two' 2511, 0, 8, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'three */' 2600, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 2610, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 2630, 2, 6, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '/* one' 2642, 0, 3, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'two' 2651, 0, 8, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'three */' 3070, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 3101, 4, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 3170, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 3320, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 3330, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 3351, 4, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 3360, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Method], 0, // 'M' 3401, 8, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 3410, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 3420, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 3900, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 3920, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 3940, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 3972, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 4001, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 4070, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 4080, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 4110, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 4160, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 4280, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 4290, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'System' 4300, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 4310, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'Text' 4320, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 4330, 1, 18, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'RegularExpressions' 4352, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 4360, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 4381, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 4390, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Method], 0, // 'M' 4431, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 4440, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 4450, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 4460, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 4470, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'Regex' 4490, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 4540, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 5040, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 5060, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5080, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5112, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 5141, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 5210, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 5220, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 5350, 12, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5480, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 5490, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'System' 5500, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5510, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'Text' 5520, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5530, 1, 18, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'RegularExpressions' 5552, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 5560, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 5581, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 5590, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Method], 0, // 'M' 5631, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 5640, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 5650, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 5660, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 5670, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'Regex' 5780, 2, 12, tokenTypeToIndex[SemanticTokenTypes.Enum], 0, // 'RegexOptions' 5790, 12, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5800, 1, 23, tokenTypeToIndex[SemanticTokenTypes.EnumMember], 0, // 'IgnorePatternWhitespace' 6404, 8, 15, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 6411, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6420, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6440, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, 6461, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6520, 12, 2, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 6644, 8, 15, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 6651, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6660, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6680, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, 6701, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6720, 1, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, 6760, 12, 2, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 7221, 12, 3, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7231, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7240, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7250, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7281, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7290, 4, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7300, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7331, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7340, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7350, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7360, 1, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7370, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7391, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7411, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7420, 8, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7430, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7440, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7450, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7460, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7470, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7500, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7530, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7561, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7581, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7611, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7631, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7651, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7660, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7670, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7680, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7690, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7710, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7741, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7750, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7760, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7770, 1, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7780, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7800, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7831, 0, 7, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7921, 12, 3, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7931, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7940, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7950, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7960, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, 7981, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7990, 4, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8000, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8010, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, 8031, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8040, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8050, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8060, 1, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8070, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8080, 1, 7, tokenTypeToIndex[SemanticTokenTypes.Class], 0, 8091, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8111, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8120, 8, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8130, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8140, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8150, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8160, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8170, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8180, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Method], 1, 8200, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8230, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8240, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Parameter], 0, 8261, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8281, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8311, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8331, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8351, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8360, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8370, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8380, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8390, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8400, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Struct], 0, 8410, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8441, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8450, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8460, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8470, 1, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8480, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8490, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Interface], 0, 8500, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8531, 0, 7, tokenTypeToIndex[SemanticTokenTypes.String], 0,