Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lsp4e-dev] Is there a simple example for implement basic editor features?

Hi Christoph, 

I am not sure if this will help, but this is the mailing list for lsp4e, you may have more luck with the lsp4j mailing list? There are devs who have made language servers based on lsp4j that may not be working on lsp4e, so not subscribed to this list. 

HTH, 
Jonah 

On Thu., Jan. 14, 2021, 08:10 Christoph Läubrich, <laeubi@xxxxxxxxxxxxxx> wrote:
The problem is that currently there is no language-server available for
gherking/cucumber (or I haven't found it yet).

gherking itself provides an own parser for java so lsp4j seems a good
choice. But based on the lack of information how to build an own
language-server from scratch its a bit hard to getting started.

What I got so far is that I can start the languageserver and connect it
to the generic editor. I'm also getting an event in the server code when
something is edited, but now I'm a bit stuck about the basics maybe e.g.
how lsp4j is supposed to handle the state of the document, how give
"feedback" to the editor, what capabilities do I need for basic
operation and so on.

So I hoped there would be a simple example demonstrating such basic
usecase :-)


Am 14.01.21 um 12:53 schrieb Alexander Fedorov:
>  > But it seems that's a bit too much work at the moment so maybe I have
> to go the way with extending GenericEditor atm.
>
> Hi Christoph,
>
> I don't know what kind of "extending GenericEditor" do you have in mind,
> but generally LPS4E already provides such an extension if one can
> connect it to a language server.
> Please note, that language server is not necessarily should be based on
> lps4j. It can be any binary that can interact with input and output
> streams using Language Server Protocol.
>  From this point investing to LS itself (regardless to technology) looks
> like a winning strategy.
>
> Regards,
> AF
>
>
> 14.01.2021 14:01, Christoph Läubrich пишет:
>> Hi Lars,
>>
>> thanks for the pointer I think my question might be misunderstood:
>>
>> If I don't get it wrong, in your example you are interfacing with an
>> *extisting* language server (dart sdk) here, what I try to archive is
>> to create the language server itself (using lsp4j) as the language I
>> want to integrate (cucumber) currently does contain one [1].
>>
>> But it seems that's a bit too much work at the moment so maybe I have
>> to go the way with extending GenericEditor atm.
>>
>>
>> [1] https://github.com/cucumber/cucumber/issues/1306
>>
>>
>>
>> Am 14.01.21 um 11:35 schrieb Lars Vogel:
>>> Hi Christoph,
>>>
>>> a working example can be found in the dart board project:
>>> https://github.com/eclipse/dartboard
>>>
>>> It uses the Dart Language server to provide Dart support in the
>>> Eclipse IDE, unfortunately we currently don't work on it due to
>>> resource constraints but it should still be a good example.
>>>
>>> We also have a tutorial on our website for implementing LSP support,
>>> see https://www.vogella.com/tutorials/EclipseLanguageServer/article.html
>>>
>>> Best regards, Lars
>>>
>>> On Wed, Jan 13, 2021 at 5:41 PM Mickael Istria <mistria@xxxxxxxxxx>
>>> wrote:
>>>>
>>>> Hi Christoph,
>>>>
>>>> Please see the code in org.eclipse.lsp4e.tests.mock where there is a
>>>> (mock) implementation of LSP4J interfaces.
>>>> There is indeed no clear walkthrough about how to implement a
>>>> Language Server with LSP4J. I looked at the Eclipse Foundation
>>>> youtube channel, and while there are some videos about general
>>>> concepts (which might still be interesting to you), there seems to
>>>> be nothing about LSP4J usage. I remember I used to showcase it 3-4
>>>> years ago in a few French JUGs, so you may be able to find those
>>>> videos, but it's going to be all in French, so probably not so
>>>> useful to you.
>>>> I suggest you start by implementing the LSP4J interfaces with dummy
>>>> but visible response and binding them in the IDE with LSP4E as
>>>> explained in
>>>> https://git.eclipse.org/c/lsp4e/lsp4e.git/tree/documentation/integrating-a-language-server.md.
>>>> Once you're setup with 1 single operation running and see the flow
>>>> of messages in actions, you'll quickly figure out how to continue
>>>> for other operations.
>>>> HTH
>>>>
>>>> _______________________________________________
>>>> lsp4e-dev mailing list
>>>> lsp4e-dev@xxxxxxxxxxx
>>>> To unsubscribe from this list, visit
>>>> https://www.eclipse.org/mailman/listinfo/lsp4e-dev
>>>
>>>
>>>
>> _______________________________________________
>> lsp4e-dev mailing list
>> lsp4e-dev@xxxxxxxxxxx
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/lsp4e-dev
>>
>
> _______________________________________________
> lsp4e-dev mailing list
> lsp4e-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/lsp4e-dev
_______________________________________________
lsp4e-dev mailing list
lsp4e-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/lsp4e-dev

Back to the top