Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Communication over stdin stdout #3

Open
JJK96 opened this issue Nov 26, 2018 · 6 comments
Open

[Feature request] Communication over stdin stdout #3

JJK96 opened this issue Nov 26, 2018 · 6 comments

Comments

@JJK96
Copy link

JJK96 commented Nov 26, 2018

Some LSP clients communicate over stdin stdout, it would be nice to make this work with that.

@davidlday
Copy link
Member

@JJK96 - apologies for not responding sooner. There is a command-line version of LanguageTool available already. See https://languagetool.org/dev for details. I typically install it via HomeBrew (Mac) or LinuxBrew (Linux), but you can also install on Windows via Chocolatey. Is this what you're looking for, or am I misunderstanding what your goal is?

I have on my todo to convert this so the user must install LanguageTool separately instead of compiling it in to the extension as is done now, but it's low on my priority list.

@JJK96
Copy link
Author

JJK96 commented Dec 11, 2018

I am already using the command line languagetool, however it does not integrate with my editor in showing the locations of errors, etc. This is the benefit of using it as a languageserver.
So, I do want to use it as a languageserver, but with input on stdin and output on stdout.

@JJK96
Copy link
Author

JJK96 commented Dec 12, 2018

I've written a wrapper to accomplish this

#!/bin/bash

PORT=20000
nc -l -p $PORT <&0 >&1 &
~/git/languagetool-languageserver/build/install/languagetool-languageserver/bin/languagetool-languageserver $PORT > /dev/null

@davidlday
Copy link
Member

Okay - I've had a chance to refresh myself on LSP documentation, and I understand your question now. I think this requires an update of languagetool-languageserver to make a wrapper that can be configured to communicate over sockets, stdin/stdout, etc. I'm going to tinker around with it today to get a better idea of how this might work without also consumint a TCP port.

@davidlday
Copy link
Member

I have a highly experimental build on the stdin-stdout branch that you can use. I've converted to using Maven for build, so you'll need that. Just do a mvn clean compile package, and you'll wind up with a fat jar at ./target/languagetool-lsp-0.0-EXPERIMENTAL.jar that can be run without any arguments.

@davidlday
Copy link
Member

Please see issue #6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants