-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allowing remote LSP connection in vscode API #102
Merged
Merged
Changes from 6 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
60eb348
Allowing remote LSP for superbol
Stevendeo 123af76
Poetry
Stevendeo 9b711ee
WS Dependency
Stevendeo 72fb347
Draft: connecting to the LSP server via a TCP socket
nberth b4c5ba4
Update with option host & port
Stevendeo d8248be
Version with proper types
Stevendeo ee7e447
Removing extra dependency
Stevendeo ed9b9a4
Not reinventing hot water
Stevendeo f6434e3
Use a cleaner interface for `Vscode_languageclient.StreamInfo`
nberth 817872f
Move server access scan (command / tcp) out of `Superbol_instance`
nberth 18f4a99
Add CHANGELOG entry
nberth 422d7a1
Merge pull request #1 from nberth/remote-lsp
Stevendeo df61d57
Update doc
Stevendeo 99a89d4
Update doc
Stevendeo f113244
Forgotten comment
Stevendeo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.. remote-lsp | ||
|
||
You can simulate a remote LSP with the following scripts: | ||
|
||
Start a server on any port (here I chose 8000): | ||
`$ nc -k -l localhost 8000 > test.nc` | ||
|
||
Then, use the following script to read on a file: | ||
``` | ||
touch $1 | ||
inotifywait -m -e modify $1 | while read line | ||
do | ||
if [ ! -s $1 ]; then | ||
echo 'Waiting for content' | ||
else | ||
cat $1 | superbol lsp > superbol.log | ||
> $1 | ||
fi | ||
done | ||
``` | ||
|
||
and call it with `test.nc`. | ||
|
||
TODO: this script only receives information, but does not send it back to | ||
VSCODE; it only writes it in superbol.log. It should answer to the client. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...or/vscode-ocaml-platform/src-bindings/vscode_languageclient/vscode_languageclient_stub.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
joo_global_object.vscode_languageclient = require("vscode-languageclient"); | ||
// joo_global_object.webSocket = require("ws"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's quite a big TODO. What happens when you try this suggestion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing was, when I started this PR, the LSP did not have a HTTP server (compatible with VSCode) , hence neither these script actually make it work. This PR was initially only to provide the base before starting the actual server