Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ide-dev] Language Server Protocol

@Patrik: I verified it. Just use Buildship 2.0 from here http://download.eclipse.org/buildship/updates/e45/milestones/2.x/
And import the parent as a gradle project. Works nicely!


2016-06-14 19:14 GMT+02:00 Sven Efftinge (sven@xxxxxxxxxxx) <sven@xxxxxxxxxxx>:
Seems like the gradle import didn't work. First you should use buildship 2.0, but even with that there is still an issue related to exclusions in resource folders.
You'll need to manually configure the src folders.
You can build on the command line ("./gradlew build") or just use the SNAPHOT builds from sonatype, alternatively.

2016-06-14 17:14 GMT+02:00 Patrik Suzzi <psuzzi@xxxxxxxxx>:
Sven, 

I cloned the typefox ls-api, and I generated the apis, though I think I did something wrong in building the project http://i.imgur.com/swxy1dr.png
I'm Using Eclipse DSL Neon RC3, So I assumed all the prerequisites were satisfied. Do you have build instructions somewhere ?

Kind Regards,
Patrik


On Tue, Jun 14, 2016 at 5:13 PM, Sven Efftinge (sven@xxxxxxxxxxx) <sven@xxxxxxxxxxx> wrote:
Hi Sopot,

I added an example, where the same server is used through interprocess communication.
The ls-api provides a so called JsonBasedLanguageServer, that takes care of the communication.
That one also implements the LanguageServer interface so it is really the same API afterwards.


Cheers,
Sven

2016-06-14 11:35 GMT+02:00 Sopot Cela <scela@xxxxxxxxxx>:
Hi Sven,

is there an example around of connecting to an already running server (such as vscode language server) using this ls-api?

Where we are stuck is basically having a vscode lang server sending a response to a basic request, rather than reimplementing a language server from scratch. The only good 'server' we have now in sight is the vscode extension which provides the JS/TS language service so we're trying to connect to that but with no luck.

In your example app I see that you 'obtain' the server through injection but in real life we'd have to connect somehow to a stream (whether socket, stdi/o etc.) and we're looking for examples of these.

Sopot

----- Oorspronkelijk bericht -----
Van: "Sven Efftinge (sven@xxxxxxxxxxx)" <sven@xxxxxxxxxxx>
Aan: "Discussions about the IDE" <ide-dev@xxxxxxxxxxx>
Verzonden: Maandag 13 juni 2016 22:10:01
Onderwerp: Re: [ide-dev] Language Server Protocol

Hi Mickael,

I've put a small example together that should give you an idea of how the LanguageServer API works:
https://github.com/TypeFox/languageserver-example

Let me know if it helps.
Sven

2016-06-13 18:34 GMT+02:00 Mickael Istria < mistria@xxxxxxxxxx > :



On 06/10/2016 10:08 PM, Sven Efftinge ( sven@xxxxxxxxxxx ) wrote:



A Java implementation of the protocol, that is VS Code independent can be found here: https://github.com/TypeFox/ls-api
It defines all the structures in Java interfaces and beans and takes care of the (de)serialization to/from json.
It is currently used by Che, Xtext, and the a JavaC based java language server.
Thanks Sven.
I'm trying to use this API to connect to VSCode implementation of language server (shipped with VSCode or with https://github.com/Microsoft/vscode-languageserver-node ) . As I'm new to ls-api and not fluent enough in JS/TS to find out the connection strategy by reading the code from vscode-ls-node, I'm currently stuck at setting up the connection to this external language server.
Does the ls-api allow connections to this external language server? In any case, do you have any example or hint of how to achieve that?
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

_______________________________________________
ide-dev mailing list
ide-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ide-dev


_______________________________________________
ide-dev mailing list
ide-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ide-dev
_______________________________________________
ide-dev mailing list
ide-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ide-dev


_______________________________________________
ide-dev mailing list
ide-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ide-dev


_______________________________________________
ide-dev mailing list
ide-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ide-dev



Back to the top