Преглед изворни кода

fix: clang formatter name (#3042)

Co-authored-by: pancake <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
pancake пре 4 месеци
родитељ
комит
4d68ee5d2c
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      packages/opencode/src/format/index.ts

+ 4 - 1
packages/opencode/src/format/index.ts

@@ -15,7 +15,10 @@ export namespace Format {
     const enabled: Record<string, boolean> = {}
     const cfg = await Config.get()
 
-    const formatters = { ...Formatter } as Record<string, Formatter.Info>
+    const formatters: Record<string, Formatter.Info> = {}
+    for (const item of Object.values(Formatter)) {
+      formatters[item.name] = item
+    }
     for (const [name, item] of Object.entries(cfg.formatter ?? {})) {
       if (item.disabled) {
         delete formatters[name]