You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,28 @@ With cursor on `xamp`, next expansions will be:
40
40
→ const config = { url: 'https://example.com' };
41
41
```
42
42
43
+
## Configuration
44
+
45
+
Customize token expansion by adding `genericExpandSelection.token.patterns` to your `settings.json`. This setting takes an array of regex strings, which are tried in order. You can set a global default and override it for specific languages.
46
+
47
+
```jsonc
48
+
{
49
+
// Global setting for all languages
50
+
"genericExpandSelection.token.patterns": [
51
+
"[a-zA-Z0-9_-]+", // matches alphanumeric characters, underscores, and hyphens
52
+
"[a-zA-Z0-9_\\-.]+", // matches identifiers with dots
53
+
"[^\\s[\\]{}()\"'`]+"// matches any non-whitespace, non-bracket character
54
+
],
55
+
56
+
// Override for a specific language (e.g., TypeScript)
57
+
"[typescript]": {
58
+
"genericExpandSelection.token.patterns": [
59
+
"\\w+"// In TypeScript, only match word characters
0 commit comments