Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: How to spell check SystemVerilog and other file types? #3059

Open
dseynhae opened this issue Feb 24, 2024 · 1 comment
Open

Q: How to spell check SystemVerilog and other file types? #3059

dseynhae opened this issue Feb 24, 2024 · 1 comment
Labels

Comments

@dseynhae
Copy link

I have very common situations where I convert my file into a supported type, to get decent results with the spell checker:

  • SystemVerilog files (.sv and .svh)
    • Temporarily change to verilog files (.v, and include "verilog" in "cSpell.enableFiletypes"`.
  • Shell scripts (.sh)
    • Temporarily change to a plaintext file (.txt)

I am actually a bit surprised that this support is not in place in the baseline cSpell product:

  • SystemVerilog is largely based on Verilog, so and the rename gives me decent results.
  • PowerShell is supported, but much more popular shell scripts (bash, zsh,..) are not?

Anyway:

Question: is there currently an easier way to get these non-supported file types spell checked?
Feature: would it be possible to create a setting that allows automatic association of a filetype with an existing spell checker?

@Jason3S Jason3S changed the title Force check even if file type or is not supported Q: How to spell check SystemVerilog and other file types? Feb 25, 2024
@Jason3S
Copy link
Collaborator

Jason3S commented Feb 25, 2024

@dseynhae,

Thank you for the question.

By default, the spell checker only checks file types that have been enabled. "cSpell.enableFiletypes" is the right setting. It works in conjunction with "cSpell.enableLanguageIds". The initial list comes from "cSpell.enableLanguageIds" and is augmented by "cSpell.enableFiletypes". The hard part is to guess the file type used internally by VSCode. The Spell:Enable Spell Checking Document Language command will handle the change for you.

Using the Spell:Enable Spell Checking Document Language command

  1. Open a file of the type you want to spell check.
  2. Open the command palette
  3. Run: Spell:Enable Spell Checking Document Language
image

Note: Please forgive the misleading name of the command. It is a left over from when VSCode referred to Document Type as Document Language. It still does internally.

That command adds or removes the file type from the enableFiletypes list. By default, shellscript files should be spell checked. If that is not happening for you, I suspect that "cSpell.enableLanguageIds" setting has been changed. Please remove it from your settings and use "cSpell.enableFiletypes" instead to add or remove a file type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants