Skip to content

Feat: Add config option stopConfigSearchAt to CSpellSettings #7477

@Jason3S

Description

@Jason3S

Problem

When the spell checker find a file to spell check, it also searches for the nearest CSpell config file. The current --stop-config-search-at command line option is only applied to the initial scan.

For example, it will keep searching up even though you give it stop dirs.

Example file structure:

cspell.json -> { "flagWords": ["my_flag_word"] }
cwd/
  test.cspell.json -> { "words": ["my_flag_word"] }
  test.txt -> Contains my_flag_word
cwd/$ cpsell -c test.cspell.json --stop-config-search-at=. *.txt

This will fail.

Originally posted by @Jason3S in #7440 (comment)

Solution

Add config option stopConfigSearchAt to CSpellSettings

stopConfigSearchAt?: FsPath | FsPath[]; 

Like dictionaryDefinition.path it needs to be resolved relative to the config file.

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