joaotavora / eglot

A client for Language Server Protocol servers
GNU General Public License v3.0
2.22k stars 203 forks source link

Windows + Intelephense partially broken with jsonrpc #1092

Closed RedChops closed 1 year ago

RedChops commented 1 year ago

My Linux and Windows environments are about as close as you can get them. On Linux + PHP, I get full code completions, etc. On Windows there are a few elDoc hints but nothing more than references that are file-local.

The events buffers don't really show anything particularly interesting (to me at least), but on Windows I get the following in *Warnings*

[jsonrpc] (warning) Invalid JSON: (invalid token near 'Content' <callback> 1 7 7) Content-Length: 204^M
^M
{"jsonrpc":"2.0","id":0,"method":"workspace/configuration","params":{"items":[{"section

I tried a different node-based lsp (volar for Vue) to check it out and that works perfectly fine. Looks like for some reason some part of the communication with Intelephense contains extra carriage return control characters. Eglot will continue to send messages to Intelephense, but it just returns empty results.

joaotavora commented 1 year ago

Ok, but please, read the issue-reporting instructions (with ALL CAPS information that you probably deleted, why?) and this bug is most likely for jsonrpc.el

RedChops commented 1 year ago

Ah my mistake - the GitHub new issue workflow never popped up for me when I hit the “New Issue” button, so there was no template to delete. Possibly because I was initially logged out and the GitHub login redirect must have taken me directly to a blank “new issue” form. Sorry about that.

In any case, the jsonrpc warning turned out to be a red herring, the underlying issue was related to composer/php autoloader.

joaotavora commented 1 year ago

Ah ok. Guess I shouldn't rely on that GitHub checkpoint. No problem then, glad the problem is fixed. Report the problem to bug-gnu-emacs@gnu.org if you do come to the conclusion that the problem lives there...