問題の概要
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"
]
}
}
}
公式の修正
参考