sublimelsp / LSP-eslint

ESLint support for Sublime LSP plugin
MIT License
36 stars 5 forks source link

Bun support #64

Closed martinkruusement closed 1 year ago

martinkruusement commented 1 year ago

For the moment, switching out node path to:

"command": ["/opt/homebrew/bin/bun", "${server_path}", "--stdio"],

Throws an error due to Bun's welcome being message included in the initial payload:

--- Error: ---
Unexpected payload in server's stdout:

Bun: a fast JavaScript runtime, package manager, bundler and test runner. (1.0.3)

Adding --silent here doesn't help either:

"command": ["/opt/homebrew/bin/bun", "${server_path}", "--stdio", "--silent"],

Not sure if this is Bun not receiving or honoring --silent or there actually isn't a way to turn it off and the message needs to be parsed out manually.

Getting this to work would be awesome, will get rid of a lot of mjs / cjs eslint-config incompatibility pains.

rchl commented 1 year ago

Looking at full server log, the server is actually starting correctly and that message doesn't show up until later. It appears that the message is triggered when the eslint LSP server tries to invoke eslint in a subprocess which just suggests that eslint server doesn't support bun for some reason. So the issue is in https://github.com/microsoft/vscode-eslint or bun itself. I would guess the former.