huacnlee / autocorrect

A linter and formatter to help you to improve copywriting, correct spaces, words, and punctuations between CJK (Chinese, Japanese, Korean).
https://huacnlee.github.io/autocorrect
MIT License
929 stars 34 forks source link

vscode configuration file isn't work properly #214

Open oopooa opened 5 months ago

oopooa commented 5 months ago

The vscode configuration file isn't taking effect in my project. Even though I have specified in the .autocorrectrc file that space-bracket should be 0 to prevent adding spaces between "int" and "[]", the space always reappears when I save the file. This indicates that the configuration file is not working as expected.

Environments

Directory tree

temptest
 ├── test.md
 └── .autocorrectrc

The .autocorrectrc file is located in the root directory of the project.

Test case

test.md

int [] nums = [1, 5, 7, 11], 循环三次的 map 结果是 {1 = 0, 5 = 1, 7 = 2}

.autocorrectrc

rules:
  # Auto add spacing between CJK (Chinese, Japanese, Korean) and English words.
  # 0 - off, 1 - error, 2 - warning
  space-word: 1
  # Add space between some punctuations.
  space-punctuation: 1
  # Add space between brackets (), [] when near the CJK.
  space-bracket: 0

Troubleshooting Steps Taken

  1. restarted vscode, not work.
  2. attempted to reload window using Ctrl + Shift + P, not work.

Is there something I missed in order to make the configuration work properly?