Closed ianhomer closed 1 month ago
As a background on checking vale configuration
cd foo/bar
vale ls-config
Shows the configurations files being used
"ConfigFiles": [
"/Users/ian/projects/my-project/foo/bar/.vale.ini",
"/Users/ian/Library/Application Support/vale/.vale.ini"
],
The global configuration location for your system is shown with vale ls-dirs
, e.g on my machine I see
Asset | Default Location | Found
StylesPath | /Users/ian/Library/Application Support/vale/styles | ✓
.vale.ini | /Users/ian/Library/Application Support/vale/.vale.ini | ✓
vale-native | /Users/ian/Library/Application Support/vale/native/vale-native | ✗
You can run vale on a file of your choice e.g. cd foo/bar && vale my-file.md
and if all set up OK the diagnostics from the command line should match the diagnostics from none-ls builtin in neovim.
Thanks!
Currently the vale builtin gets the cwd for the spawned process from the root directory, e.g.
When we specify the cwd function for the builtin (as in this PR), we see the process spawning from the directory of the file being processed, e.g. file
foo/bar/my-file.md
(with the change in this PR) we see the debug logThis has the effect of vale looking for the vale config in this folder first, e.g.
foo/bar/.vale.ini
, allowing per directory override. If you don't have a per-directory config file and had your.vale.ini
in the project root (or a ancestor directory) of the root then vale will pick this up as it did before this change.