{"id":30176051,"url":"https://github.com/marimo-team/codemirror-sql","last_synced_at":"2025-08-12T02:19:17.436Z","repository":{"id":307394837,"uuid":"1029407518","full_name":"marimo-team/codemirror-sql","owner":"marimo-team","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-08T08:08:20.000Z","size":212,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-08T10:07:45.512Z","etag":null,"topics":["codemirror","codemirror-extension","sql"],"latest_commit_sha":null,"homepage":"https://marimo-team.github.io/codemirror-sql/","language":"TypeScript","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/marimo-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-31T02:26:19.000Z","updated_at":"2025-08-08T08:08:08.000Z","dependencies_parsed_at":"2025-07-31T03:44:51.267Z","dependency_job_id":"b0c2b6a8-e61d-4702-80e1-ffa02d237421","html_url":"https://github.com/marimo-team/codemirror-sql","commit_stats":null,"previous_names":["marimo-team/codemirror-sql"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/marimo-team/codemirror-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marimo-team%2Fcodemirror-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marimo-team%2Fcodemirror-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marimo-team%2Fcodemirror-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marimo-team%2Fcodemirror-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marimo-team","download_url":"https://codeload.github.com/marimo-team/codemirror-sql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marimo-team%2Fcodemirror-sql/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269987330,"owners_count":24508223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-extension","sql"],"created_at":"2025-08-12T02:19:16.122Z","updated_at":"2025-08-12T02:19:17.429Z","avatar_url":"https://github.com/marimo-team.png","language":"TypeScript","readme":"# codemirror-sql\n\nA CodeMirror extension for SQL linting and visual gutter indicators.\n\n## Features\n\n- ⚡ **Real-time validation** - SQL syntax checking as you type with detailed error messages\n- 🎨 **Visual gutter** - Color-coded statement indicators and error highlighting\n- 💡 **Hover tooltips** - Schema info, keywords, and column details on hover\n- 🔮 **CTE autocomplete** - Auto-complete support for CTEs\n\n## Installation\n\n```bash\nnpm install @marimo-team/codemirror-sql\n# or\npnpm add @marimo-team/codemirror-sql\n```\n\n## Usage\n\n### Basic Setup\n\n```ts\nimport { sql, StandardSQL } from '@codemirror/lang-sql';\nimport { basicSetup, EditorView } from 'codemirror';\nimport { sqlExtension, cteCompletionSource } from '@marimo-team/codemirror-sql';\n\nconst schema = {\n  users: [\"id\", \"name\", \"email\", \"active\"],\n  posts: [\"id\", \"title\", \"content\", \"user_id\"]\n};\n\nconst editor = new EditorView({\n  doc: \"SELECT * FROM users WHERE active = true\",\n  extensions: [\n    basicSetup,\n    sql({\n      dialect: StandardSQL,\n      schema: schema,\n      upperCaseKeywords: true\n    }),\n    StandardSQL.language.data.of({\n      autocomplete: cteCompletionSource,\n    }),\n    sqlExtension({\n      linterConfig: {\n        delay: 250 // Validation delay in ms\n      },\n      gutterConfig: {\n        backgroundColor: \"#3b82f6\", // Current statement color\n        errorBackgroundColor: \"#ef4444\", // Error highlight color\n        hideWhenNotFocused: true\n      },\n      enableHover: true,\n      hoverConfig: {\n        schema: schema,\n        hoverTime: 300,\n        enableKeywords: true,\n        enableTables: true,\n        enableColumns: true\n      }\n    })\n  ],\n  parent: document.querySelector('#editor')\n});\n```\n\n## Demo\n\nSee the [demo](https://marimo-team.github.io/codemirror-sql/) for a full example.\n\n## Development\n\n```bash\n# Install dependencies\npnpm install\n\n# Run tests\npnpm test\n\n# Run demo\npnpm dev\n```\n\n## License\n\nApache 2.0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarimo-team%2Fcodemirror-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarimo-team%2Fcodemirror-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarimo-team%2Fcodemirror-sql/lists"}