@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

36,005

Version

6.2.0

License

MIT

Unpacked Size

329 kB

Total Files

21

Last publish

Collaborators

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