cucumber / common

A home for issues that are common to multiple cucumber repositories
https://cucumber.io/docs
MIT License
3.36k stars 698 forks source link

Gherkin language server support #1306

Open laeubi opened 3 years ago

laeubi commented 3 years ago

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.

aslakhellesoy commented 3 years ago

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.

laeubi commented 3 years ago

@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.

aslakhellesoy commented 3 years ago

@SabotageAndi where is that VSCode LSP implementation you mentioned?

SabotageAndi commented 3 years ago

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.

aslakhellesoy commented 2 years ago

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