josa42 / coc-sh

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

failed to start: Error: spawn UNKNOWN #75

Open listenerri opened 1 year ago

listenerri commented 1 year ago

https://github.com/josa42/coc-sh/blob/5bb12e6809f8728cb0f0322d77b0c7bfde46c7b1/src/extension.ts#L21

Windows doesn't support shebang: https://stackoverflow.com/questions/43419893/how-do-i-fix-error-spawn-unknown-with-node-js-v7-8-0-on-windows-10

listenerri commented 1 year ago

This works:

    const serverOptions = {
        run: {
          module: require.resolve('bash-language-server/out/cli.js'),
          args: ['start'],
          transport: coc_nvim_1.TransportKind.stdio
        }
    }

But it not handle config.commandPath, I'm not familiar with js, so I don't know how to retain support for config.commandPath