229 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 (205)
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\SemanticTokensRangesTests.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, // '"' 5020, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 5040, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5060, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5092, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 5121, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 5190, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 5200, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 5330, 12, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5460, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 5470, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'System' 5480, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5490, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'Text' 5500, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5510, 1, 18, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'RegularExpressions' 5532, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 5540, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 5561, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 5570, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Method], 0, // 'M' 5611, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 5620, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 5630, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 5640, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 5650, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'Regex' 5760, 2, 12, tokenTypeToIndex[SemanticTokenTypes.Enum], 0, // 'RegexOptions' 5770, 12, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5780, 1, 23, tokenTypeToIndex[SemanticTokenTypes.EnumMember], 0, // 'IgnorePatternWhitespace' 6384, 8, 15, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 6391, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6400, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6420, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, 6441, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6500, 12, 2, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 6624, 8, 15, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 6631, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6640, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6660, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, 6681, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6700, 1, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, 6740, 12, 2, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 7201, 12, 3, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7211, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7220, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7230, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7261, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7270, 4, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7280, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7311, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7320, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7330, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7340, 1, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7350, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7371, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7391, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7400, 8, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7410, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7420, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7430, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7440, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7450, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7480, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7510, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7541, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7561, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7591, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7611, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7631, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7640, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7650, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7660, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7670, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7690, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7721, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7730, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7740, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7750, 1, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7760, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7780, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7811, 0, 7, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7901, 12, 3, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7911, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7920, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7930, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7940, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, 7961, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7970, 4, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7980, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7990, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, 8011, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8020, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8030, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8040, 1, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8050, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8060, 1, 7, tokenTypeToIndex[SemanticTokenTypes.Class], 0, 8071, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8091, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8100, 8, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8110, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8120, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8130, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8140, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8150, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8160, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Method], 1, 8180, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8210, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8220, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Parameter], 0, 8241, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8261, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8291, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8311, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8331, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8340, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8350, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8360, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8370, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8380, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Struct], 0, 8390, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8421, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8430, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8440, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8450, 1, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8460, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8470, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Interface], 0, 8480, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8511, 0, 7, tokenTypeToIndex[SemanticTokenTypes.String], 0,