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.
clang-formatfor C / C++ / Objective-C / Objective-C++ruff formatfor Pythonoxfmtfor TypeScript / JavaScript / JSX / TSX / JSON / YAML / TOML / HTML / Vue / Svelte / CSS / SCSS / Less / Markdown / MDX / GraphQLgofmtfor Gorustfmtfor Rust
- Single command surface inside Sublime Text
- Scope-based formatter routing
- Native project config first:
.clang-format,pyproject.toml,Cargo.toml,oxfmt.config.* - Built-in config generation wizard for current files and whole workspaces
- Preset selection with
compact,recommended, andwideprofiles - Smart target detection for monorepos, preview before apply, and explicit existing-file handling
- Optional Ruff config merge into
pyproject.toml - Install guidance, diagnostics panel, and format-on-save support
- Runtime stays dependency-free on the Python side
- Python runtime compatibility from Sublime Text's Python 3.8 up through 3.14
- Copy
LanguageFormat/into your Sublime TextPackages/directory. Copy the whole package directory, not individual files. If you update the package manually, replace the entireLanguageFormat/tree and then reload plugins or restart Sublime Text. - Install the formatter binaries you need:
- C / C++:
winget install LLVM.LLVM - Python:
uv tool install ruff - TypeScript / JavaScript:
npm install --save-dev oxfmt - Go: install Go, which includes
gofmt - Rust:
rustup component add rustfmt
LanguageFormat: FormatLanguageFormat: Format DocumentLanguageFormat: Format SelectionLanguageFormat: Diagnose Current FileLanguageFormat: Install GuideLanguageFormat: Create Config For Current FileLanguageFormat: Create Workspace Configs
Config generation workflow:
- Run
LanguageFormat: Create Config For Current Fileto generate config files for the active language, orLanguageFormat: Create Workspace Configsto scan the whole workspace. - Choose a preset:
Recommended,Compact, orWide. - Choose the target directory. The first option is the plugin's smart project root guess for the current file or workspace.
- For Python, choose whether Ruff settings should live in
ruff.tomlor merge intopyproject.toml. - Choose how to handle existing files: skip them, replace them, or write
.examplefiles alongside them. - Review the preview panel and confirm before the plugin writes anything.
Default key bindings:
- Windows / Linux:
ctrl+alt+f - macOS:
super+alt+f
Default settings live in LanguageFormat/LanguageFormat.sublime-settings.
Primary keys:
format_on_saveformat_timeout_msexecutablesextra_argsselector_mapshow_output_panel_on_error
Recommended workflow:
- Keep editor settings focused on execution (
format_on_save,executables, timeouts) - Store style in project-native config files such as
.clang-format,pyproject.toml,ruff.toml,rustfmt.toml, and.oxfmtrc.jsonc - Use the built-in config generator commands when a project does not have formatter configs yet
- Keep
extra_argsfor execution details, not for large embedded style definitions
Generated config files:
- The generator walks you through preset selection, target-directory selection, and existing-file handling
- Current-file generation writes
.editorconfigplus the formatter config that matches the active syntax - Workspace generation writes
.editorconfigand any formatter configs inferred from supported files already present in the workspace - Python configs can be written to
ruff.tomlor merged intopyproject.toml - Existing config collisions can be skipped, replaced, or emitted as
.examplefiles - Every run shows a preview panel before writing files
- After manually updating the package, use
Tools -> Developer -> Reload Pluginsor restart Sublime Text if new commands do not appear immediately
- CI runs on every push to
main - Every successful push to
maincreates a GitHub prerelease - Each prerelease publishes:
LanguageFormat.sublime-packageLanguageFormat.sublime-package.sha256
This keeps stable semantic tags separate from edge builds while still giving you a downloadable artifact for every commit.
ruff check LanguageFormat tests
python -m compileall LanguageFormat tests
python -m pytestclang-formatsupports multi-selection formatting;ruff formatsupports a single selectiongofmt,rustfmt, andoxfmtcurrently format the whole buffer onlyrustfmtis invoked with--emit stdoutand tries to infer the edition from the nearestCargo.toml