0

I use some files written with Gherkin mode, but they don't have the ".feature" extension. I tried to change some visual code files related to cucumber extension to be able to highlight files that are not .feature but I had no success.

For example:

Workspace settings.json:

{
    "folders": [
        {
            "path": "/home/user/git"
        },
        {
            "path": "/home/user/Documents/scripts"
        }
    ],
    "settings": {}

    "cucumberautocomplete.steps": [
        "*.myext"
    ],
    "cucumberautocomplete.syncfeatures": "*.myext",
    "cucumberautocomplete.strictGherkinCompletion": true
}
Gama11
  • 31,714
  • 9
  • 78
  • 100
FortCWB
  • 5
  • 6
  • Possible duplicate of [How to make VS Code to treat other file extensions as certain language?](https://stackoverflow.com/questions/29973619/how-to-make-vs-code-to-treat-other-file-extensions-as-certain-language) – Gama11 Apr 16 '19 at 13:56

1 Answers1

0

It worked changing the file /home/user/.config/Code/User/settings.json and adding this config:

    "files.associations": {
        "*.myext": "feature"
    }
{
    "editor.renderWhitespace": "all",
    "window.titleBarStyle": "custom",
    "editor.fontSize": 15,
    "python.jediEnabled": false,
    "terminal.integrated.shell.linux": "/bin/bash",
    "workbench.colorTheme": "Visual Studio Dark",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "[feature]": {
    },
    "files.associations": {
        "*.myext": "feature"
    }
}
FortCWB
  • 5
  • 6