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' 1410, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 1420, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Number], 0, // '1' 1460, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 15412, 0, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 1550, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'z' 1560, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 1570, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Number], 0, // '1' 15917, 3, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 1600, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 1610, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 1951, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 1960, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 2071, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 2080, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 2090, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], (int)TokenModifiers.Static, // 'C' 2470, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 2500, 2, 6, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '/* one' 2512, 0, 3, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'two' 2521, 0, 8, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'three */' 2610, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 2620, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 2640, 2, 6, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '/* one' 2652, 0, 3, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'two' 2661, 0, 8, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'three */' 3080, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 3111, 4, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 3180, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 3330, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 3340, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 3361, 4, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 3370, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Method], 0, // 'M' 3411, 8, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 3420, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 3430, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 3910, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 3930, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 3950, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 3982, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 4011, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 4080, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 4090, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 4120, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 4170, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 4290, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 4300, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'System' 4310, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 4320, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'Text' 4330, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 4340, 1, 18, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'RegularExpressions' 4362, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 4370, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 4391, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 4400, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Method], 0, // 'M' 4441, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 4450, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 4460, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 4470, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 4480, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'Regex' 4500, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 4550, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 5030, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 5050, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5070, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5102, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 5131, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 5200, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 5210, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 5340, 12, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5470, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 5480, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'System' 5490, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5500, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'Text' 5510, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5520, 1, 18, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'RegularExpressions' 5542, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 5550, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 5571, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 5580, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Method], 0, // 'M' 5621, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 5630, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 5640, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 5650, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 5660, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'Regex' 5770, 2, 12, tokenTypeToIndex[SemanticTokenTypes.Enum], 0, // 'RegexOptions' 5780, 12, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5790, 1, 23, tokenTypeToIndex[SemanticTokenTypes.EnumMember], 0, // 'IgnorePatternWhitespace' 6394, 8, 15, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 6401, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6410, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6430, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, 6451, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6510, 12, 2, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 6634, 8, 15, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 6641, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6650, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6670, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, 6691, 8, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 6710, 1, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, 6750, 12, 2, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, 7211, 12, 3, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7221, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7230, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7240, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7271, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7280, 4, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7290, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7321, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7330, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7340, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7350, 1, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7360, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7381, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7401, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7410, 8, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7420, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7430, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7440, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7450, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7460, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7490, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7520, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7551, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7571, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7601, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7621, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7641, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7650, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7660, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7670, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7680, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7700, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7731, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7740, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7750, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7760, 1, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7770, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7790, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7821, 0, 7, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7911, 12, 3, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7921, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7930, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7940, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7950, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, 7971, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 7980, 4, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 7990, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8000, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, 8021, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8030, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8040, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8050, 1, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8060, 5, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8070, 1, 7, tokenTypeToIndex[SemanticTokenTypes.Class], 0, 8081, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8101, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8110, 8, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8120, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8130, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8140, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8150, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8160, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8170, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Method], 1, 8190, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8220, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8230, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Parameter], 0, 8251, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8271, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8301, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8321, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8341, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8350, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8360, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8370, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8380, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8390, 1, 6, tokenTypeToIndex[SemanticTokenTypes.Struct], 0, 8400, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8431, 0, 4, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8440, 4, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8450, 6, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8460, 1, 9, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, 8470, 9, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8480, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Interface], 0, 8490, 4, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, 8521, 0, 7, tokenTypeToIndex[SemanticTokenTypes.String], 0,