Skip to content

[FEATURE]: Add cljfmt formatter support for Clojure files #13424

@finalfantasia

Description

@finalfantasia

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Description

Add support for the cljfmt formatter to automatically format Clojure files (.clj, .cljs, .cljc, and .edn) when they are edited in OpenCode.

Requirements

The formatter should:

  • Support .clj, .cljs, .cljc, and .edn file extensions
  • Use the cljfmt command
  • Only be enabled when the cljfmt command is available
  • Follow the same pattern as other formatters (gofmt, rustfmt, and etc.)

Implementation

  • Add cljfmt formatter definition in packages/opencode/src/format/formatter.ts
  • Update formatter documentation in packages/web/src/content/docs/formatters.mdx

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussiondocs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions