bscan / PerlNavigator

Perl Language Server that includes syntax checking, perl critic, and code navigation
MIT License
198 stars 39 forks source link

turn logging on by default for all editors #123

Closed WhoIsSethDaniel closed 6 months ago

WhoIsSethDaniel commented 6 months ago

A very naive PR.

There is a comment next to the code that says:

Get logging from vscode, but turn it off elsewhere. Sublime Text seems to struggle with it on Windows

That last bit about Sublime makes me wonder if this is a good idea.

bscan commented 6 months ago

Thanks! This looks good to me. The Sublime comment is left over from before logging was done to STDERR. At the time, I didn't realize that everything logged to stdout anywhere within the server would be sent to some lsp clients and interpreted as a JSON-RPC. This doesn't apply to vscode because it uses node-ipc. The Navigator also in theory supports using named pipes and socket files (as provided by the Microsoft vscode-languageserver-node package), but I've never tested those. Stdout->Stderr change: https://github.com/bscan/PerlNavigator/commit/d8069a430889e3ea89e85364ccf31d0739b03bf5

I just verified in Sublime and it works with logging enabled.