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
feat: Rewrote enableMethodSnippets from the ground, fixing old bugs and introducing absolutely new modes (settings). Now enableMethodSnippets works on absolutely any variable that actually has signature. Finally!
Copy file name to clipboardExpand all lines: README.MD
+42-13Lines changed: 42 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ TOC:
7
7
8
8
-[Top Features](#top-features)
9
9
-[Minor Useful Features](#minor-useful-features)
10
+
-[Method Snippets](#method-snippets)
10
11
-[Auto Imports](#auto-imports)
11
12
-[Rename Features](#rename-features)
12
13
-[Special Commands List](#special-commands-list)
@@ -35,19 +36,6 @@ Also is not supported in the web.
35
36
36
37
90% work done in this extension highly improves completions experience!
37
38
38
-
### Method Snippets
39
-
40
-
(*enabled by default*)
41
-
42
-
Expands arrow callbacks with signature snippet with adding additional undo stack!
43
-
44
-
Example:
45
-
46
-
```ts
47
-
const callback = (arg) => {}
48
-
callback->callback(arg)
49
-
```
50
-
51
39
### Strict Emmet
52
40
53
41
(*enabled by default*) when react langs are in `emmet.excludeLanguages`
@@ -205,6 +193,47 @@ const a = 5
205
193
a=6
206
194
```
207
195
196
+
### Method Snippets
197
+
198
+
(*enabled by default*)
199
+
200
+
Expands arrow callback completions with signature snippet. Also adds additional undo stack!
201
+
202
+
Example:
203
+
204
+
```ts
205
+
const callback = (arg) => {}
206
+
callback->callback(arg)
207
+
```
208
+
209
+
#### Configuration
210
+
211
+
There are value descriptions for two settings:
212
+
213
+
`tsEssentialPlugins.methodSnippets.insertText`:
214
+
215
+
```ts
216
+
const example = ({ a }, b?, c=5, ...d) => { }
217
+
// prefer-name (default)
218
+
example({ a }, b, c, ...d)
219
+
// always-declaration (recommended)
220
+
example({ a }, b?, c=5, ...d)
221
+
// always-name
222
+
example(__0, b, c, d)
223
+
```
224
+
225
+
`tsEssentialPlugins.methodSnippets.skip`:
226
+
227
+
```ts
228
+
constexample= ({ a }, b?, c=5, ...d) => { }
229
+
// only-rest
230
+
example({ a }, b, c)
231
+
// optional-and-rest
232
+
example({ a })
233
+
// no-skip (default)
234
+
example({ a }, b, c, ...d)
235
+
```
236
+
208
237
## Auto Imports
209
238
210
239
With this plugin you have total (almost) control over auto imports that appear in completions, quick fixes and import all quick fix. Some examples of what you can do:
0 commit comments