cucumber / cucumber/vscode

Better brackets and double-quotes (highlight, auto-close, surround)

Open
#255 0 comments 0 reactions 0 assignees View on GitHub
:zap: enhancement
Dominant language
TypeScript
Stars
88
Forks
33
PR merge metrics
No merged PRs in 30d

Description

### 🤔 What's the problem you're trying to solve?

When I edit a feature file and I want to wrap a word/sentence in double-quotes, I mark the word and type `"`. The word is replaced by the `"`. For most other languages VS-Code wraps the word in `"`. This would be very convenient.

Also:
* `<>` and `()` could be [highlighted](https://code.visualstudio.com/api/language-extensions/language-configuration-guide#brackets-definition) with `>` and `)`
* `"`, `<` and `(` could be [automatically closed](https://code.visualstudio.com/api/language-extensions/language-configuration-guide#autoclosing) with `"`, `>` and `)`
* `<` and `(` could also be [wrapped](https://code.visualstudio.com/api/language-extensions/language-configuration-guide#autosurrounding) with `>` and `)`

### ✨ What's your proposed solution?

Update the `language-configuration.json` to support these features:

```json
{
"comments": {
"lineComment": "#"
},
"brackets": [
["<", ">"],
["(", ")"]
]
"autoClosingPairs": [
["<", ">"],
["(", ")"],
["\"", "\""],
["\"\"\"", "\"\"\""],
["```", "```"]
],
"surroundingPairs": [
["<", ">"],
["(", ")"],
["\"", "\""],
["\"\"\"", "\"\"\""],
["```", "```"]
]
}
```

### ⛏ Have you considered any alternatives or workarounds?

It would be silly to edit the file locally.

### 📚 Any additional context?

This is the documentation for the file:
https://code.visualstudio.com/api/language-extensions/language-configuration-guide

Contributor guide

Open the contributing guide

Research direction

Open the language-configuration.json file and compare its current settings with the VS Code language-configuration documentation linked in the issue. Add the requested bracket, auto-closing, and surrounding-pair behavior, then verify that double quotes, angle brackets, parentheses, and backticks behave as described in the editor.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
tooling
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.