tpope / vim-cucumber

Vim Cucumber runtime files

Home Page:http://www.vim.org/scripts/script.php?script_id=2973

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature narrative block has no syntax hilighting

kavika13 opened this issue · comments

If you look at the screenshots at:

Or the original JBehave grammar at:

You will see that In order to, As a and I want to have special meaning in the context of the Feature: block.

It would be nice to get syntax highlighting on the In order, As a, and I want parts.


Note that I'm not asking to match the JBehave Narrative: grammar, as Gherkin has diverged from it, and JBehave is a .story file, not a .feature file.

I'm also not asking specifically to syntax highlight the word to, though I'll leave this up to your discretion. The Cucumber page screenshots don't syntax hilight the word to, but as far as I've seen they're always present, and the original JBehave grammar mandated it.

It's not part of the grammar, and highlighting it is discouraged.

It's not part of the grammar

As far as I know, there is no official grammar for gherkin, just a defacto one - can you correct me on this with a link? I was trying to say it was part of the JBehave grammar (which may be irrelevant because Gherkin is sort of a "spiritual successor" to it). But ignoring this and moving on to your next point.

highlighting it is discouraged.

I agree with closing this issue, due to this specific advice from the page you linked:

Some tool developers have built-in handling of fragments like In order to, As a and I want. (This is a common narrative style for feature headers). We recommend that you do not try to recognize or highlight this. People should be free to choose the wording they want. Moreover, we don’t have translations of those fragments, and even if we did, this style is too prescriptive.

(OT: Thanks for the fast reply, and for your work :) I definitely appreciate this being included in gVim)