FurqanSoftware / codemirror-languageserver

Language Server integration for CodeMirror 6
BSD 3-Clause "New" or "Revised" License
183 stars 24 forks source link

Make `rootUri` optional and repsond to all request #10

Closed arnoson closed 2 years ago

arnoson commented 2 years ago

Closes #9

I had problems using this plugin together with sumneko's lua-language-server. It worked when omitting the rootUri (see https://github.com/sumneko/lua-language-server/wiki/Why-scanning-home-folder%3F) and sending a response to every rpc server request (see the specifications: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#requestMessage).

I'm not sure if the way I implemented it is the most straight forward way and I was a bit lost with alle the types, therefore used any. So feel free to change the PR to your liking.

hjr265 commented 2 years ago

@arnoson Thanks for investigating this and submitting this PR.

I am looking into it right now.

It seems Lua works just fine even when I send the rootUri (but that directory obviously exists for me in my project). But the specification seems to allow null for rootUri, so may be that we can allow.

Let me just do a bit more work and get back to you here.

hjr265 commented 2 years ago

Done through 04a2ca92a61bde2e84809ea58d8566b1d0781545 and c7ed3b2369634a685ccc317130f4f97029d9c675.

arnoson commented 2 years ago

Awesome, thank you!