streetsidesoftware / cspell

A Spell Checker for Code!
https://cspell.org
MIT License
1.26k stars 103 forks source link

The following error occurred while running the “cspell link add @cspell/dict-python” command #6380

Open merliang opened 4 weeks ago

merliang commented 4 weeks ago

I have started the command prompt as an administrator

Jason3S commented 4 weeks ago

@merliang,

Thank you. Two things:

  1. Please add the actual error.
  2. It should not be necessary to install the python dictionary. It is included in CSpell by default and should be enabled for all python files.

There are a few of ways to enabled the dictionary in non-python files:

  1. Add cspell:dictionary python to the file. It will turn on the python dictionary.
  2. Add it to one of the dictionary sections in the config file. cspell.config.yaml

    dictionaries:
      - python # Add Python dictionary here to always have it on.
    
    overrides:
      - filename: 
        - '**/docs/**/*.md' # glob pattern to match all markdown files in the docs folder
        dictionaries:
          - python # Enable Python dictionary for markdown files in the docs folder
    
    languageSettings:
      - languageId: 
          - vue # the file type to apply the settings to
        dictionaries: 
          - python # Enable Python dictionary for Vue files