@replit/codemirror-lang-csharp
TypeScript icon, indicating that this package has built-in type declarations

6.2.0 • Public • Published

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'),
});

Readme

Keywords

none

Package Sidebar

Install

npm i @replit/codemirror-lang-csharp

Weekly Downloads

47,804

Version

6.2.0

License

MIT

Unpacked Size

329 kB

Total Files

21

Last publish

Collaborators

  • jonesit-replit
  • ltazmin_replit
  • stkenned
  • moudy
  • lhchavez
  • masad-frost
  • ryantm
  • tobyho
  • cbrewster
  • theflowingsky
  • brianpool
  • brenoafb
  • ink404
  • alexisreplit
  • replitdstewart
  • ryanweingast
  • mikewesthad
  • jackyzha0
  • szymon_k
  • lopezhoracio
  • jamesaustinreplit
  • talorreplit