Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Parameter highlighting in VSCode Light/Dark Mode #89

Open
kiran-epic opened this issue Aug 4, 2022 · 4 comments
Open

No Parameter highlighting in VSCode Light/Dark Mode #89

kiran-epic opened this issue Aug 4, 2022 · 4 comments
Assignees
Labels
πŸ› bug Defect / Bug

Comments

@kiran-epic
Copy link

kiran-epic commented Aug 4, 2022

πŸ‘“ What did you see?

When using VSCode in light /dark theme mode, the step parameters are not highlighted at all. The highlighting works when using other themes like light+/dark+

βœ… What did you expect to see?

The parameter should be highlighted making it easier to identify

πŸ“¦ Which tool/library version are you using?

Extension Version : 1.2.8
Extension Settings :

{
    "cucumber.features": [
        "cypress/e2e/features/**/*.feature"
    ],
    "cucumber.glue": [
        "cypress/e2e/step_definitions/**/*.ts"
    ]
}

πŸ”¬ How could we reproduce it?

Steps to reproduce the behavior:

  1. Install the extension & configure it such that the step definitions are available for the extension to parse the steps
  2. Switch the Visual Studio Theme (Code -> Preferences -> Color Theme ->Light (Visual Studio)

Light Mode (Visual Studio)

image

Dark Mode (Visual Studio)

image

πŸ“š Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

@aslakhellesoy
Copy link
Contributor

aslakhellesoy commented Aug 13, 2022

We use the parameter semantic token type to highlight parameters. It is also referenced in the docs

It appears that some VSCode themes don't have a style for this token type. For example:

  • Dark (Visual Studio) - no styling of param
  • Dark+ (default dark) - has styling of param

We need to study the semantic highlight guide and syntax highlight guide more closely to get to the bottom of this I think.

The scope inspector might also help.

@nklowns
Copy link

nklowns commented Jan 10, 2023

Mine Dark+ (default dark) dont highlight
image
How can I help debugging this?

@kieran-ryan kieran-ryan added the πŸ› bug Defect / Bug label Dec 3, 2023
@cortexcompiler
Copy link

I was not getting syntax highlighting in some of my Dark mode color themes and this comment fixed it for me through the addition of this setting:

    "[cucumber]": {
        "editor.semanticHighlighting.enabled": true
    },

@kieran-ryan
Copy link
Sponsor Member

kieran-ryan commented Jan 18, 2024

Glad this resolved the issue for you @cortexcompiler and appreciate you contributing that mitigation.

Have raised a PR so that the extension enables semantic highlighting by default for gherkin, so modifying configuration depending on colour theme will not be required.

Would you be able to provide the names of some colour themes where you experienced the issued and the configuration resolved? Would like to test against them to ensure properly resolves the issue in your case. A quick try of the above configuration with 'GitHub Dark' and 'GitHub Light' did not appear to work for me - though the '+' versions of both work without configuration; interested if works for you, and what version of VSCode you are using?

@kieran-ryan kieran-ryan self-assigned this Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
πŸ› bug Defect / Bug
Projects
None yet
Development

No branches or pull requests

5 participants