-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Taking over this issue to use it as the proposal for higher fidelity highlighting as a general idea and a plan to get there - if we should (I think we should).
[Editor] Original issue content:
The short version is I want to get this (the C# snippet from the highlight.js website):

Closer to this (same snippet but in the latest version of Visual Studio 2019):

Actual snippet of code:
using System.IO.Compression;
#pragma warning disable 414, 3021
namespace MyApplication
{
[Obsolete("...")]
class Program : IInterface
{
public static List<int> JustDoIt(int count)
{
Console.WriteLine($"Hello {Name}!");
return new List<int>(new int[] { 1, 2, 3 })
}
}
}
My question isn't about writing the CSS to do that for a theme, its about having classes to target those styles in the first place. Where does the use of a specific highlight.js class start and end (eg. "hljs-function" for declarations but not calls?). Like, is there a spec somewhere for when something should be used?
I've read through some of the related issues like #1731 and #1378 so I do understand reluctance for adding classes that can target these types of cases as core functionality especially when not all languages do this. I guess I'm querying, more as a guide, if I were to implement (some of) this for C#, I don't want to step on toes about class name consistency.