This is probably intended but i would like to know if there is a workaround.
I would like my configuration in a central location that can be shared between the command line interface and the visual studio code extension. Using the example for the documentation i set it up as follows:
# ~/.config/cspell/cspell.yaml
---
$schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json
version: '0.2'
dictionaryDefinitions:
- name: project-words
path: 'project-words.txt'
addWords: true
dictionaries:
- project-words
And try to use it from the command line as follows:
mkdir -p ~/example-project
cd ~/example-project
echo "Hello Mundo" > example.md
echo "Mundo" >project-words.txt
env CSPELL_DEFAULT_CONFIG="~/.config/cspell/cspell.yaml" cspell *.md
I got the following error:
Errors:
Dictionary Error with (project-words) Error: ENOENT: no such file or directory, open '~/.config/cspell/project-words.txt'
I would expect relative paths to be relative to the current working directory, not the configuration file, or at least a way to specify which one i want, like vscode ${workspace} or ${env:PWD}.
This is probably intended but i would like to know if there is a workaround.
I would like my configuration in a central location that can be shared between the command line interface and the visual studio code extension. Using the example for the documentation i set it up as follows:
And try to use it from the command line as follows:
I got the following error:
I would expect relative paths to be relative to the current working directory, not the configuration file, or at least a way to specify which one i want, like vscode
${workspace}or${env:PWD}.