Skip to content

cSpell.import is not respecting language setting #5042

@pcastellazzi

Description

@pcastellazzi

I want to spell check my files in both English and Spanish.

I installed the following extensions:

Installed extensions:

  • Code Spell Checker
  • Spanish - Code Spell Checker

I updated my settings.json to reflect this:

// ...
"cSpell.language": "en,es",

All good, it works as expected.

I want to use cspell-cli too, so i moved my configuration to an external file.

~/.config/cspell/cspell.json

{
    "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
    "version": "0.2",
    "language": "en,es"
}

I updated my settings.json to reflect this:

// ...
"cSpell.import": [ "${env:HOME}/.config/cspell/cspell.json" ],

All words in spanish are now marked as errors.

I also tried a YAML file

---
$schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json
version: '0.2'
language: en,es

# intentional
[{]}]

This should trigger a syntax error and it does not, but relevant to my case, when the file is correct the language settings is still ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions