dense-analysis / ale

Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
BSD 2-Clause "Simplified" License
13.51k stars 1.43k forks source link

cspell option “-c config.yaml” not work #4772

Open cxwx opened 4 months ago

cxwx commented 4 months ago

Information

VIM version

NVIM v0.9.5 Build type: Release LuaJIT 2.1.1713773202

Operating System: macos

What went wrong

I set

vim.g.ale_cspell_options = "-c ~/rc/config/cspell/cspell.config.yaml"

for vim let g:ale_cspell_options = "-c ~/rc/config/cspell/cspell.config.yaml" but the config of cspell is not working.

I found the Info of ALE using

cspell -c ~/rc/config/cspell/cspell.config.yaml --stdin < "filename"

this cause cspell -c not work the right way is

cspell -c ~/rc/config/cspell/cspell.config.yaml  "filename"

Reproducing the bug

  1. let g:ale_cspell_options = "-c ~/rc/config/cspell/cspell.config.yaml"
  2. -c option not work

:ALEInfo

(executable check - success) cspell
(finished - exit code 1) ['/bin/zsh', '-c', '''cspell'' lint --no-color --no-progress --no-summary --language-id="lua" -c ~/rc/config/cspell/cspell.config.yaml -- stdin < ''/var/folders/05/dfw4d4ds0nx2xyyn7yt5ky3r0000gn/T/nvim.chenxu/HovICW/1/lint_cx.lua''']