I want to get SonarLint working in Neovim based on the LSP server. Since the LSP server is already used by SonarLint for VS Code and Neovim understands LSP as well, it means I should be able to achieve my goal simply by connecting to the LSP server.
In order to get an understanding for how to use the LSP server I wanted to first run it from the shell and poke around a bit. So I cloned the Git repo, ran
mvn verify and it built without issues. Then I ran
java -jar target/sonarlint-language-server-1.2-SNAPSHOT.jar and I got a message that I need to specify a port. No problem, just pass some port like
Well, that’s where my confusion begins. From looking at the error message and the Java source code it looks like the application wants to open a client port to an existing server. But should the application not be the server and my editor the client which connects to it? It seems I’m having something backwards here. I can run other language servers like pyls, clangd or eclipse.jdt.ls from the shell; they are not useful that way, but they work.
Would someone please be kind enough to clear up my confusion? It seems I need to launch some other application as a server first, and then pass the port to this application, but then how does it communicate with the editor?