{"id":50124355,"url":"https://github.com/yviscool/lang-format","last_synced_at":"2026-05-23T19:01:58.982Z","repository":{"id":358188186,"uuid":"1240404265","full_name":"yviscool/lang-format","owner":"yviscool","description":"All-in-one formatter plugin for Sublime Text / 面向 Sublime Text 的多语言一体化格式化插件","archived":false,"fork":false,"pushed_at":"2026-05-16T06:18:02.000Z","size":34,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-16T07:26:55.810Z","etag":null,"topics":["clang-format","cpp","formatter","formatting","go","gofmt","javascript","oxc","oxfmt","python","ruff","rust","rustfmt","sublime-text","sublime-text-plugin","typescript"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yviscool.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2026-05-16T05:11:08.000Z","updated_at":"2026-05-16T06:18:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yviscool/lang-format","commit_stats":null,"previous_names":["yviscool/lang-format"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yviscool/lang-format","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yviscool%2Flang-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yviscool%2Flang-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yviscool%2Flang-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yviscool%2Flang-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yviscool","download_url":"https://codeload.github.com/yviscool/lang-format/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yviscool%2Flang-format/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33408490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T18:09:33.147Z","status":"ssl_error","status_checked_at":"2026-05-23T18:09:31.380Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["clang-format","cpp","formatter","formatting","go","gofmt","javascript","oxc","oxfmt","python","ruff","rust","rustfmt","sublime-text","sublime-text-plugin","typescript"],"created_at":"2026-05-23T19:01:54.373Z","updated_at":"2026-05-23T19:01:58.970Z","avatar_url":"https://github.com/yviscool.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LanguageFormat\n\n[中文说明](README.zh-CN.md)\n\n`LanguageFormat` is a from-scratch Sublime Text 4 formatter package focused on one practical goal: a single formatter workflow across multiple languages, with first-class support for C++, Python, TypeScript, Go, and Rust.\n\n## Formatter Stack\n\n- `clang-format` for C / C++ / Objective-C / Objective-C++\n- `ruff format` for Python\n- `oxfmt` for TypeScript / JavaScript / JSX / TSX / JSON / YAML / TOML / HTML / Vue / Svelte / CSS / SCSS / Less / Markdown / MDX / GraphQL\n- `gofmt` for Go\n- `rustfmt` for Rust\n\n## Highlights\n\n- Single command surface inside Sublime Text\n- Scope-based formatter routing\n- Native project config first: `.clang-format`, `pyproject.toml`, `Cargo.toml`, `oxfmt.config.*`\n- Built-in config generation wizard for current files and whole workspaces\n- Preset selection with `compact`, `recommended`, and `wide` profiles\n- Smart target detection for monorepos, preview before apply, and explicit existing-file handling\n- Optional Ruff config merge into `pyproject.toml`\n- Install guidance, diagnostics panel, and format-on-save support\n- Runtime stays dependency-free on the Python side\n- Python runtime compatibility from Sublime Text's Python 3.8 up through 3.14\n\n## Install\n\n1. Copy `LanguageFormat/` into your Sublime Text `Packages/` directory.\n   Copy the whole package directory, not individual files. If you update the package manually, replace the entire `LanguageFormat/` tree and then reload plugins or restart Sublime Text.\n2. Install the formatter binaries you need:\n\n- C / C++: `winget install LLVM.LLVM`\n- Python: `uv tool install ruff`\n- TypeScript / JavaScript: `npm install --save-dev oxfmt`\n- Go: install Go, which includes `gofmt`\n- Rust: `rustup component add rustfmt`\n\n## Commands\n\n- `LanguageFormat: Format`\n- `LanguageFormat: Format Document`\n- `LanguageFormat: Format Selection`\n- `LanguageFormat: Diagnose Current File`\n- `LanguageFormat: Install Guide`\n- `LanguageFormat: Create Config For Current File`\n- `LanguageFormat: Create Workspace Configs`\n\nConfig generation workflow:\n\n1. Run `LanguageFormat: Create Config For Current File` to generate config files for the active language, or `LanguageFormat: Create Workspace Configs` to scan the whole workspace.\n2. Choose a preset: `Recommended`, `Compact`, or `Wide`.\n3. Choose the target directory. The first option is the plugin's smart project root guess for the current file or workspace.\n4. For Python, choose whether Ruff settings should live in `ruff.toml` or merge into `pyproject.toml`.\n5. Choose how to handle existing files: skip them, replace them, or write `.example` files alongside them.\n6. Review the preview panel and confirm before the plugin writes anything.\n\nDefault key bindings:\n\n- Windows / Linux: `ctrl+alt+f`\n- macOS: `super+alt+f`\n\n## Configuration\n\nDefault settings live in `LanguageFormat/LanguageFormat.sublime-settings`.\n\nPrimary keys:\n\n- `format_on_save`\n- `format_timeout_ms`\n- `executables`\n- `extra_args`\n- `selector_map`\n- `show_output_panel_on_error`\n\nRecommended workflow:\n\n- Keep editor settings focused on execution (`format_on_save`, `executables`, timeouts)\n- Store style in project-native config files such as `.clang-format`, `pyproject.toml`, `ruff.toml`, `rustfmt.toml`, and `.oxfmtrc.jsonc`\n- Use the built-in config generator commands when a project does not have formatter configs yet\n- Keep `extra_args` for execution details, not for large embedded style definitions\n\nGenerated config files:\n\n- The generator walks you through preset selection, target-directory selection, and existing-file handling\n- Current-file generation writes `.editorconfig` plus the formatter config that matches the active syntax\n- Workspace generation writes `.editorconfig` and any formatter configs inferred from supported files already present in the workspace\n- Python configs can be written to `ruff.toml` or merged into `pyproject.toml`\n- Existing config collisions can be skipped, replaced, or emitted as `.example` files\n- Every run shows a preview panel before writing files\n- After manually updating the package, use `Tools -\u003e Developer -\u003e Reload Plugins` or restart Sublime Text if new commands do not appear immediately\n\n## Releases\n\n- CI runs on every push to `main`\n- Every successful push to `main` creates a GitHub prerelease\n- Each prerelease publishes:\n  - `LanguageFormat.sublime-package`\n  - `LanguageFormat.sublime-package.sha256`\n\nThis keeps stable semantic tags separate from edge builds while still giving you a downloadable artifact for every commit.\n\n## Development\n\n```powershell\nruff check LanguageFormat tests\npython -m compileall LanguageFormat tests\npython -m pytest\n```\n\n## Current Limits\n\n- `clang-format` supports multi-selection formatting; `ruff format` supports a single selection\n- `gofmt`, `rustfmt`, and `oxfmt` currently format the whole buffer only\n- `rustfmt` is invoked with `--emit stdout` and tries to infer the edition from the nearest `Cargo.toml`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyviscool%2Flang-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyviscool%2Flang-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyviscool%2Flang-format/lists"}