GitXplorerGitXplorer
s

codemirror

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
939911ac8d65f57fe3e04c836235eb3904c377e0

chore: bump version

mmacjuul committed 12 hours ago
Verified
33727e046aa3b15a1c25d1431c9e65a69112bfc0

refactor: improve define event options

mmacjuul committed 12 hours ago
Verified
9b95f08c0b77d1bcc85b6ee7cdf75901407de11a

feat: update anyKeyword

mmacjuul committed 13 hours ago
Verified
bd4d008f775a70f93b5f6aef02c514e6ec3969bd

feat: support index concurrently

mmacjuul committed 13 hours ago
Verified
a06833d9437030bf9d90f3dfdcb2e2cd6c1f9f15

change: expose index input

mmacjuul committed 13 hours ago
Verified
0d857666a7367450981c1c2c32a817820e7c92d1

feat: allow insertion of params

mmacjuul committed 13 hours ago

README

The README file for this repository.

SurrealQL Support for CodeMirror


 

     

@surrealdb/codemirror

This library provides full support for the SurrealQL language within your CodeMirror editors.

Some features include:

  • Intelligent SurrealQL highlighting
  • Folding support for blocks, objects, and arrays
  • Automatic indentation support
  • Support for comment toggling
  • Embedded JavaScript highlighting

How to install

Install it with:

# using npm
npm i @surrealdb/codemirror
# or using pnpm
pnpm i @surrealdb/codemirror
# or using yarn
yarn add @surrealdb/codemirror

Next, just import it with:

const { surrealql } = require("@surrealdb/codemirror");

or when you use modules:

import { surrealql } from "@surrealdb/codemirror";

Example usage

import { surrealql } from "@surrealdb/codemirror";

const state = EditorState.create({
    doc: "SELECT * FROM table",
    extensions: [
        surrealql()
    ]
});

const editor = new EditorView({
    parent: document.getElementById("editor"),
    state: state,
});

@surrealdb/lezer

This package contains the low level Lezer grammar used to perform SurrealQL syntax highlighting.

We recommend using @surrealdb/codemirror as it extends the grammar with additional CodeMirror supported functionality.