josa42 / coc-sh

SH language server extension using bash-language-server for coc.nvim.
MIT License
205 stars 4 forks source link

need shellcheck -x so that it follows sources but how to pass parameters to shellcheck #65

Closed richtong closed 1 year ago

richtong commented 2 years ago

OK, I can't quite figure this out, I went to the coc-settings.json and triggered command completion as suggested, but i don't see a way to pass the -x parameter so things like:

source $SCRIPT_DIR/include.sh

do not generate a SC1091 error. With shellcheck 0.8, it will strip out the variable and just ry ./include.sh but -x needs to specified to turn on source searching.

josa42 commented 1 year ago

You should be able to set bashIde.shellcheckArguments.

https://github.com/josa42/coc-sh/blob/abf7ab565be5c9dff60985d2a5be4399d6d2143c/package.json#L84-L88

richtong commented 1 year ago

Nice!

Sent via Superhuman ( @.*** )

On Mon, Mar 06, 2023 at 1:54 PM, Josa Gesell < @.*** > wrote:

You should be able to set bashIde.shellcheckArguments.

https:/ / github. com/ josa42/ coc-sh/ blob/ abf7ab565be5c9dff60985d2a5be4399d6d2143c/ package. json#L84-L88 ( https://github.com/josa42/coc-sh/blob/abf7ab565be5c9dff60985d2a5be4399d6d2143c/package.json#L84-L88 )

— Reply to this email directly, view it on GitHub ( https://github.com/josa42/coc-sh/issues/65#issuecomment-1457059878 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AANTCR4L7SAAZXFM3KQGYODW2ZMJHANCNFSM6AAAAAAQBOQWW4 ). You are receiving this because you authored the thread. Message ID: <josa42/coc-sh/issues/65/1457059878 @ github. com>