common icon indicating copy to clipboard operation
common copied to clipboard

Gherkin language server support

Open laeubi opened this issue 4 years ago • 5 comments

Summary

Gherkin already provides a process to parse feature files from the commandline as well as parsing "in code". This still needs adaption when used, e.g. in an IDE. For some time now there is a Language Server Protocol that allows to support the easy integration in multiple IDEs with less code.

Expected Behavior

The process can be started with 'gherkin --server' behaving according to the LSP4 protocol using the std input/output stream for communication.

Current Behavior

currently it is only possible to parse feature files one-time with a cucumber specific json response

Context & Motivation

See summary, this would allow to integrate advanced editing capabilities to a majority of IDEs without "reinvent the wheel"

Your Environment

The users operating system that is capable of executing the gherkin command.

laeubi avatar Jan 13 '21 13:01 laeubi

Hi @laeubi - I think this could be incredibly useful.

Is this something you'd be willing and able to contribute, or kick-start? I personally do not have capacity to do this now.

aslakhellesoy avatar Jan 21 '21 19:01 aslakhellesoy

@aslakhellesoy I'm currently doing some investigations on how this could be archived using LSP4J (java) but if someone else can do it better and faster (e.g. GO, C+++, ...) feel free to raise a hand :-)

I can't promise when I could came up with a prototype but will keep this in mind.

laeubi avatar Jan 22 '21 11:01 laeubi

@SabotageAndi where is that VSCode LSP implementation you mentioned?

aslakhellesoy avatar Feb 04 '21 10:02 aslakhellesoy

This is the mentioned VS Code Extension: https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete Everything with autocomplete is done in VS Code via LSP.

SabotageAndi avatar Feb 22 '21 08:02 SabotageAndi

This is in progress: https://github.com/cucumber/common/pull/1689

aslakhellesoy avatar Aug 24 '21 12:08 aslakhellesoy