【VSCode】 「サジェスト」から不要な項目を消す方法

この記事は約5分で読めます。
記事内に広告が含まれています

エディターの画面

こんにちは、さち です。

普段、ウェブサイトを作るときは「Visual Studio Code(以下:VSCode)」を使っています。動作が軽く色々な機能も追加できるのに、無料で利用できる最強のコードエディターアプリです。

先日、VSCode の「サジェスト(Emmet)」から「単位」を消す方法について記事を書きましたが、他の任意の「項目」を消したい人もいると思います。

そこで、今回は VSCode の「サジェスト」から任意の種類の項目を消す削除)方法について書いていきます。

スポンサーリンク

消したいサジェストの「種類」を調べる

「種類」を調べる

エディターの画面

「サジェスト」の左端には「アイコン」があり、このアイコンからサジェストの「種類」が分かります。

自分が消したいサジェストの「種類」を次項の表から特定して、VSCode の設定を変更しましょう。

「種類」に対応する「設定名」

主なサジェストの「種類」

アイコン 種類 設定名
メソッド(Methods) editor.suggest.showMethods
関数(Functions) editor.suggest.showFunctions
コンストラクター(Constructors) editor.suggest.showConstructors
変数(Variables) editor.suggest.showVariables
フィールド(Fields) editor.suggest.showFields
Type parameters editor.suggest.showTypeParameters
定数(Constants) editor.suggest.showConstants
クラス(Classes) editor.suggest.showClasses
インターフェイス(Interfaces) editor.suggest.showInterfaces
構造体(Structures) editor.suggest.showStructs
イベント(Events) editor.suggest.showEvents
演算子(Operators) editor.suggest.showOperators
モジュール(Modules) editor.suggest.showModules
プロパティ(Properties) editor.suggest.showProperties
列挙型(Enumerations) editor.suggest.showEnums
Enum Members editor.suggest.showEnumMembers
参照(References) editor.suggest.showReferences
キーワード(Keywords) editor.suggest.showKeywords
ファイル(Files) editor.suggest.showFiles
フォルダー(Folders) editor.suggest.showFolders
色(Colors) editor.suggest.showColors
単位・ユニット(Unit) editor.suggest.showUnits
スニペット(Snippet prefixes) editor.suggest.showSnippets
テキスト(Text) editor.suggest.showWords

その他のサジェスト・関連機能

名前・機能 設定名
カスタムカラー editor.suggest.showCustomcolors
ユーザー editor.suggest.showUsers
editor.suggest.showValues
非推奨 editor.suggest.showDeprecated
提案のアイコン editor.suggest.showIcons
候補の詳細 editor.suggest.showInlineDetails
問題 editor.suggest.showIssues
候補ウィジェット下部のステータスバー editor.suggest.showStatusBar

特定の「種類」のサジェストを消す設定

例として、「単位・ユニット」のサジェストを消してみます。他の種類のサジェストを消すには適宜読み替えて下さい。

  1. VSCode の「settings.json」を開きます。開き方が分からない場合は、下記リンク先の記事を参考にして下さい。
    VSCode: 設定ファイル「settings.json」を直接開きたい
    こんにちは、さち です。今回は、この VSCcode で、設定ファイル「settings.json」を直接開く方法について書いていきます。
  2. settings.json の { } 内に、「単位・ユニット」の設定名 editor.suggest.showUnits と false追記して、上書き保存します。
    "editor.suggest.showUnits": false,
  3. これで、サジェストに「単位・ユニット」が出なくなります。(「単位」以外のサジェストは出ます)
    エディター画面
「設定」で「設定名」を検索することで、UI での設定変更も可能です(「settings.json」と連動しています)

コメント

タイトルとURLをコピーしました