@replit/codemirror-lang-csharp
v6.2.0
Published
A C# mode for CodeMirror 6
Downloads
189,706
Maintainers
Keywords
Readme
CodeMirror C# Language Support
A CodeMirror extension that provides C# syntax highlighting and language support.
Usage
import { EditorState } from '@codemirror/state';
import { EditorView } from '@codemirror/view';
import { csharp } from "@replit/codemirror-lang-csharp";
import { basicSetup } from 'codemirror';
new EditorView({
state: EditorState.create({
doc: `
using System;
namespace Test
{
class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
}
}
}
`,
extensions: [basicSetup, csharp()],
}),
parent: document.querySelector('#editor'),
});