2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VSCode 拡張 “Code Spell Checker” の cSpell.enabledLanguageIds が “enabledFileTypes” に変わっていた

Posted at

はじめに

VSCode の拡張機能「Code Spell Checker」は、スペルミスを自動で指摘してくれる便利なツールです。

これまでの設定では cSpell.enabledLanguageIds を使って対応言語を指定していました。
最新バージョンでは cSpell.enabledFileTypes に設定が移行している点を整理し、使い方を分かりやすくまとめます。

変更点

参考にさせていただいた元となる Qiita 記事をご紹介します。
VSCodeでスペルミスを指摘してくれるCode Spell CheckerをRuby言語に対応させる – suke_pg 氏
こちらの設定では、以下のように cSpell.enabledLanguageIds を使っていました:

"cSpell.enabledLanguageIds": [
  "css",
  "html",
  "javascript",
  "json",
  "less",
  "markdown",
  "plaintext",
  "scss",
  "text",
  "ruby",
  "yaml",
  "yml"
]

この設定により、指定した言語ファイルに対して Code Spell Checker が動作するようになります 。

最新バージョンでの設定 cSpell.enabledFileTypes

2025年8月現在の Code Spell Checker(最新版)では、cSpell.enabledFileTypes という設定に変わっており、言語ではなく ファイルタイプ を指定します。
例えば、以下のような設定が一般的です:

"cSpell.enabledFileTypes": {
  "json": true,
  "markdown": true,
  "plaintext": true,
  "typescript": true,
  "typescriptreact": true,
  "javascript": true,
  "javascriptreact": true,
  "vue": true,
  "html": true,
  "css": true,
  "scss": true,
  "less": true,
  "yaml": true,
  "xml": true,
  "c": true
}

このように、json や markdown、typescript、vue など、幅広いファイルタイプを個別にオンオフできます。

まとめ

  • 旧方式
    • cSpell.enabledLanguageIds 対象言語をリストで指定。「text」や「ruby」などを含む
  • 新方式
    • cSpell.enabledFileTypes 各ファイルタイプを個別にオン/オフ可能。柔軟な制御が可能

最新バージョンでは cSpell.enabledFileTypes の利用が推奨されており、従来の 言語指定 から ファイルタイプ指定 へと移行している点を押さえておきましょう。

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?