atom / atom-languageclient

Language Server Protocol support for Atom (the basis of Atom-IDE)
https://ide.atom.io/
MIT License
389 stars 78 forks source link

Trouble getting server process to start #156

Closed cfinegan closed 6 years ago

cfinegan commented 6 years ago

I'm working on an IDE integration for Racket, and I'm having some trouble getting the language server recognized by the Atom client. This is my first Atom plugin so I'm sure it's some configuration issue on my end.

When I switch to a .rkt file, it seems that startServerProcess is not firing correctly. I've looked into issue #107 regarding startServerProcess and I've followed the troubleshooting steps laid out in that post.

I've also cloned yang-lsp and ide-yang from issue #107 and can't get his language server to load correctly either. When I load a .yang file, I get the correct syntax highlighting from the yang grammar, but the server is not invoked at all.

The furthest I've gotten in my troubleshooting is to try overwriting shouldStartForEditor to always return true, which forces the language server to load (as expected), but comes with other issues: When I override this method in the ide-yang, it simply crashes. The Racket langserver will start under these conditions (and I can see its process with ps --forest), but doesn't seem to be correctly reporting its output to the client. I can see its stderr if I redirect it to a file, but the Atom client does not seem to register any of the diagnostic messages that get sent over the wire.

Any tips for further troubleshooting would be greatly appreciated.

Here are the links to my code: atom-ide-racket atom-language-racket racket-langserver

daviwil commented 6 years ago

Hi @cfinegan, I apologize for not responding to this sooner. Looks like you figured out the issue based on a recent commit I found on atom-ide-racket? Thanks for sticking with it!

cfinegan commented 6 years ago

Yes, that turned out to be the issue preventing the server from starting for .rkt files. Adding source.racket as a grammar scope for Racket fixed it.