{"id":17046997,"url":"https://github.com/deathaxe/defaultsyntaxchooser","last_synced_at":"2026-02-16T06:01:54.309Z","repository":{"id":158368640,"uuid":"439675275","full_name":"deathaxe/DefaultSyntaxChooser","owner":"deathaxe","description":"A Sublime Text plugin to select a default syntax dialect","archived":false,"fork":false,"pushed_at":"2024-11-23T13:08:35.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-06T08:57:48.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deathaxe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-12-18T17:28:14.000Z","updated_at":"2024-11-23T13:08:38.000Z","dependencies_parsed_at":"2024-04-14T09:34:37.298Z","dependency_job_id":"3adc98ef-ebf9-4d57-84b6-3b52864ea6ed","html_url":"https://github.com/deathaxe/DefaultSyntaxChooser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deathaxe/DefaultSyntaxChooser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathaxe%2FDefaultSyntaxChooser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathaxe%2FDefaultSyntaxChooser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathaxe%2FDefaultSyntaxChooser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathaxe%2FDefaultSyntaxChooser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deathaxe","download_url":"https://codeload.github.com/deathaxe/DefaultSyntaxChooser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathaxe%2FDefaultSyntaxChooser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29501359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T05:57:17.024Z","status":"ssl_error","status_checked_at":"2026-02-16T05:56:49.929Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-10-14T09:48:04.981Z","updated_at":"2026-02-16T06:01:54.292Z","avatar_url":"https://github.com/deathaxe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Default Syntax Chooser\n\nThis Sublime Text 4 plugin provides the `set_default_syntax_dialect` command.\n\nThis command manipulates a syntax file (e.g.: SQL.sublime-syntax) to make\nit point to a desired dialect (e.g.: MySQL.sublime-syntax). As a result\nthe dialect is used whenever the default syntax's scope (e.g.: `source.sql`)\nis addressed. This way it is possible to specify the syntax to use in\nembedded code blocks.\n\nSyntax definitions may embed others to highlight certain parts of a document\nwith that external language. Very popular examples are:\n\n1) HTML embeds CSS and JavaScript.\n2) Markdown embeds many other syntaxes to highlight fenced code blocks\n3) Ruby/PHP embed various syntaxes (e.g.: SQL, XML, ...) to highlight HEREDOCs\n\nThey do so by embedding scopes (e.g.: `embed: scope:source.sql`).\n\nBut what if such a syntax has several dialects while the embedding syntax\ndoesn't have any solution to distinguish them?\n\nRuby/PHP only know about \"SQL\" syntax.\nBut SQL may be used as synonym for MySQL, PostgresSQL, SQLight or T-SQL.\n\n## Usage\n\nA command for the target syntax is to be added to _Default.sublime-commands_\n\n```json\n[\n    {\n        \"caption\": \"Set Syntax Dialect: SQL\",\n        \"command\": \"set_default_syntax_dialect\",\n        \"args\": {\n            \"syntax_file\": \"Packages/SQL/SQL.sublime-syntax\"\n        }\n    }\n]\n```\n\nThe target syntax should be an alias and must be extended from a dialect.\n\n```yaml\n%YAML 1.2\n---\nname: SQL\nscope: source.sql\nversion: 2\n\nextends: Packages/SQL/MySQL.sublime-syntax\n\nfile_extensions:\n  - sql\n  - ddl\n  - dml\n\nfirst_line_match: |-\n  (?xi:\n    ^ \\\\s* -- .*? -\\\\*- .*? \\\\bsql\\\\b .*? -\\\\*-  # editorconfig\n  )\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeathaxe%2Fdefaultsyntaxchooser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeathaxe%2Fdefaultsyntaxchooser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeathaxe%2Fdefaultsyntaxchooser/lists"}