streetsidesoftware / vscode-spell-checker

A simple source code spell checker for code
https://streetsidesoftware.github.io/vscode-spell-checker/
Other
1.41k stars 126 forks source link

No need to detect files in the user directory #3158

Open WangJincheng4869 opened 5 months ago

WangJincheng4869 commented 5 months ago

There is no need to check the files in the user directory, as my code is not in the user directory.

image

HUMORCE commented 3 months ago

Reproduced. This appears when a directory has been opened, while cSpell.spellCheckOnlyWorkspaceFiles disabled (default). the entries will disappear after some time.

It's not a big deal, but it would be nice if it could be improved.

Reproduction:

  1. git clone git@github.com:streetsidesoftware/vscode-spell-checker.git --depth=1
  2. code ./vscode-spell-checker
  3. Focus on the problems panel.
Screenshot 2024-05-27 at 2 02 35 AM
WangJincheng4869 commented 3 months ago

Actually, it's almost always there, and if I don't check here, I think it will reduce some system usage to some extent

HUMORCE commented 3 months ago

An alternative solution: Remove item vscode-userdata from cSpell.allowedSchemas.

C Spell: Allowed Schemas
Control which file schemas will be checked for spelling (VS Code must be restarted for this setting to take effect).

Some schemas have special meaning like:

untitled - Used for new documents that have not yet been saved
vscode-notebook-cell - Used for validating segments of a Notebook.
vscode-userdata - Needed to spell check .code-snippets
Jason3S commented 3 months ago

@HUMORCE and @WangJincheng4869,

A few things:

  1. There is a prerelease of 4.0 available. This release moves issues from the Problems pane into its own pane. This might alleviate the annoyance. The new version offers the ability to quickly toggle the visibility of issues. Please try it out. Feedback is welcome.
  2. The sole purpose of cSpell.spellCheckOnlyWorkspaceFiles is to tell the spell checker to not check files outside of the workspace. Outside of that, it is difficult to know which files users want to spell check.
  3. The spell checker only detects issues in files that are open. If they are not open, it should not report on them.
HUMORCE commented 3 months ago

The spell checker only detects issues in files that are open. If they are not open, it should not report on them.

So, the files(e.g. settings.json, .code-snippets, etc.) opened in background by vscode itself are included.

There is a prerelease of 4.0 available. This release moves issues from the Problems pane into its own pane. This might alleviate the annoyance. The new version offers the ability to quickly toggle the visibility of issues. Please try it out. Feedback is welcome.

I like the implementation.

jmschp commented 3 months ago

@Jason3S

  1. There is a prerelease of 4.0 available. This release moves issues from the Problems pane into its own pane. This might alleviate the annoyance. The new version offers the ability to quickly toggle the visibility of issues. Please try it out. Feedback is welcome.
  2. The sole purpose of cSpell.spellCheckOnlyWorkspaceFiles is to tell the spell checker to not check files outside of the workspace. Outside of that, it is difficult to know which files users want to spell check.
  3. The spell checker only detects issues in files that are open. If they are not open, it should not report on them.

About 1, just enabled version 4.0.3. The new Tab seems like a great option.

About 3, in latest version 3, I have issues with that. I close the files, but they stay open in the Problems tab. The same seems to be happening in version 4.0.3. Is there any configuration for that? I couldn't find anything.

Thanks

Jason3S commented 3 months ago

About 1, just enabled version 4.0.3. The new Tab seems like a great option.

👍

About 3, in latest version 3, I have issues with that. I close the files, but they stay open in the Problems tab. The same seems to be happening in version 4.0.3. Is there any configuration for that? I couldn't find anything.

Looks like the count is not getting correctly updated.

image