.editorconfig 文件对 VSCode 中的代码格式没有影响

Edw*_*uay 7 visual-studio-code editorconfig

我正在尝试让 EditorConfig 在 VSCode 中工作。

我做了以下事情:

  • npm i -g editorconfig
  • 安装了“EditorConfig for VSCode”扩展
  • 添加.editorconfig文件到根目录
root = true    

[*]
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
Run Code Online (Sandbox Code Playgroud)
  • 不起作用,不会从.scss文件中删除空格
  • 启用“保存时格式化”
    • 还是不行
  • 关闭并打开 VSCode
    • 还是不行
  • 检查以确保添加了 npm 包:npm list -g --depth=0
    • 是的:+-- editorconfig@0.15.3
    • 还是不行

在此输入图像描述

我需要做什么才能让 EditorConfig 在 VSCode 中工作?