{"id":28508838,"url":"https://github.com/surrealdb/codemirror","last_synced_at":"2026-01-20T14:01:05.260Z","repository":{"id":255197640,"uuid":"767631442","full_name":"surrealdb/codemirror","owner":"surrealdb","description":"An addon for supporting SurrealQL within your CodeMirror editors","archived":false,"fork":false,"pushed_at":"2026-01-19T23:12:49.000Z","size":578,"stargazers_count":10,"open_issues_count":0,"forks_count":5,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-20T05:52:24.833Z","etag":null,"topics":["codemirror","codemirror-addon","codemirror-editor","surreal","surrealdb","surrealql","surrealql-grammar"],"latest_commit_sha":null,"homepage":"https://surrealdb.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/surrealdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-05T16:34:58.000Z","updated_at":"2026-01-19T23:11:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba2f8271-6572-4025-9682-daec1ed0df1d","html_url":"https://github.com/surrealdb/codemirror","commit_stats":null,"previous_names":["surrealdb/codemirror"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/surrealdb/codemirror","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surrealdb%2Fcodemirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surrealdb%2Fcodemirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surrealdb%2Fcodemirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surrealdb%2Fcodemirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/surrealdb","download_url":"https://codeload.github.com/surrealdb/codemirror/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surrealdb%2Fcodemirror/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28604712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codemirror","codemirror-addon","codemirror-editor","surreal","surrealdb","surrealql","surrealql-grammar"],"created_at":"2025-06-08T21:39:53.818Z","updated_at":"2026-01-20T14:01:05.116Z","avatar_url":"https://github.com/surrealdb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg width=120 src=\"https://raw.githubusercontent.com/surrealdb/icons/main/surreal.svg\" /\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eSurrealQL Support for CodeMirror\u003c/h3\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/surrealdb/surrealql-codemirror\"\u003e\u003cimg src=\"https://img.shields.io/badge/status-beta-ff00bb.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://www.npmjs.com/package/@surrealdb/codemirror\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/%40surrealdb%2Fcodemirror?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://surrealdb.com/discord\"\u003e\u003cimg src=\"https://img.shields.io/discord/902568124350599239?label=discord\u0026style=flat-square\u0026color=5a66f6\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://twitter.com/surrealdb\"\u003e\u003cimg src=\"https://img.shields.io/badge/twitter-follow_us-1d9bf0.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://www.linkedin.com/company/surrealdb/\"\u003e\u003cimg src=\"https://img.shields.io/badge/linkedin-connect_with_us-0a66c2.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://www.youtube.com/channel/UCjf2teVEuYVvvVC-gFZNq6w\"\u003e\u003cimg src=\"https://img.shields.io/badge/youtube-subscribe-fc1c1c.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# @surrealdb/codemirror\n\nThis library provides full support for the SurrealQL language within your CodeMirror editors.\n\nSome features include:\n- Intelligent SurrealQL highlighting\n- Folding support for blocks, objects, and arrays\n- Automatic indentation support\n- Support for comment toggling\n- Embedded JavaScript highlighting\n- Support for linting of supported syntax based on version\n\n## How to install\n\nInstall it with:\n\n```sh\n# using npm\nnpm i @surrealdb/codemirror\n# or using pnpm\npnpm i @surrealdb/codemirror\n# or using yarn\nyarn add @surrealdb/codemirror\n```\n\nNext, just import it with:\n\n```ts\nconst { surrealql } = require(\"@surrealdb/codemirror\");\n```\n\nor when you use modules:\n\n```ts\nimport { surrealql } from \"@surrealdb/codemirror\";\n```\n\n## Example usage\n\n```ts\nimport { surrealql } from \"@surrealdb/codemirror\";\n\nconst state = EditorState.create({\n    doc: \"SELECT * FROM table\",\n    extensions: [\n        surrealql()\n    ]\n});\n\nconst editor = new EditorView({\n    parent: document.getElementById(\"editor\"),\n    state: state,\n});\n```\n\n```ts\nimport { surrealql, surrealqlVersionLinter } from \"@surrealdb/codemirror\";\n\nconst state = EditorState.create({\n    doc: \"SELECT * FROM table\",\n    extensions: [\n        surrealql(),\n\t\tsurrealqlVersionLinter(\"2.0.0\")\n    ]\n});\n\nconst editor = new EditorView({\n    parent: document.getElementById(\"editor\"),\n    state: state,\n});\n```\n\n# @surrealdb/lezer\n\nThis package contains the low level [Lezer](https://lezer.codemirror.net/) grammar used to perform SurrealQL syntax highlighting.\n\nWe recommend using `@surrealdb/codemirror` as it extends the grammar with additional CodeMirror supported functionality.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurrealdb%2Fcodemirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurrealdb%2Fcodemirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurrealdb%2Fcodemirror/lists"}