0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Zed】ファイル保存時のフォーマットが動作しない問題の対処法

Posted at

問題の概要

Zed v0.208.4にアップデート後、format_on_saveが動作しなくなる問題が発生しました。

症状

  • 設定でformat_on_save: "on"を指定していてもファイル保存時にフォーマットされない
  • 「deprecated settingsを修正」ボタンを押しても解決しない
  • ESLintのsource.fixAll.eslintなどのcode actionのみが設定に残る

対処法

パターン1: トップレベルにformatter設定がない場合

"auto"を追加します。

{
  "languages": {
    "TypeScript": {
      "formatter": [
        { "code_action": "source.fixAll.eslint" },
        "auto"
      ]
    }
  }
}

パターン2: トップレベルにformatter設定がある場合

トップレベルの値(例: "prettier")を追加します。

{
  "formatter": "prettier",
  "languages": {
    "TypeScript": {
      "formatter": [
        { "code_action": "source.fixAll.eslint" },
        "prettier"
      ]
    }
  }
}

公式の修正

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?