Skip to content

Commit fa7f929

Browse files
committed
Adding new snippets and syntax highlights.
1 parent ffdceb0 commit fa7f929

10 files changed

+197
-89
lines changed

README.md

+29-4
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@ This extentsion supports snippets, hover-over, syntax highlighting of Speech Mar
1212

1313
Syntax highlighting is supported in JSON, JavaScript, and TypeScript. Any Speech Markdown tags will be highligted within string literals.
1414

15-
<img src="https://raw.githubusercontent.com/speechmarkdown/speechmarkdown-vscode/master/images/syntaxhighlights.png" width="50%" alt="Syntax highlighting example"/>
15+
<img src="https://raw.githubusercontent.com/speechmarkdown/speechmarkdown-vscode/master/images/syntaxhighlights.png" width="75%" alt="Syntax highlighting example"/>
1616

1717
Languages that support Speech Markdown syntax highlighting are:
1818

1919
- JavaScript
2020
- JSON
2121
- TypeScript
22-
23-
YAML is planned for a future (release)[].
22+
- YAML (new)
2423

2524
### Hover Over
2625

@@ -30,7 +29,9 @@ Hover over the mark up text for additional information.
3029

3130
### Snippets
3231

33-
All Speech Markdown snippets start with "smd." There are two approaches to applying snippets.
32+
All Speech Markdown snippets start with "smd."
33+
34+
There are two approaches to applying snippets.
3435

3536
#### Text Selection
3637

@@ -48,3 +49,27 @@ All Speech Markdown snippets start with "smd." There are two approaches to apply
4849
3. Select the snippet
4950

5051
<img src="https://raw.githubusercontent.com/speechmarkdown/speechmarkdown-vscode/master/images/snippetsample02.gif" width="50%" alt="Snippet text selection"/>
52+
53+
#### Enable Intellisense in TypeScript and JavaScript
54+
55+
By default Visual Studio Code does not provide IntelliSense handling in strings. For more information, please see:
56+
57+
[TS/JS Path Quick Suggestion IntelliSense Does Not Work Unless QuickSuggestions.strings is enabled #23962](https://github.com/microsoft/vscode/issues/23962)
58+
59+
__NOTE:__ IntelliSense in strings is _not_ available in JSON or YAML.
60+
61+
If you wish to enabled IntelliSense in strings, then apply the following settings to your project folder.
62+
63+
1. Create a .vscode folder
64+
2. Ad the following settings a new settings.json file:
65+
66+
```json
67+
"editor.quickSuggestions": {
68+
"other": true,
69+
"comments": false,
70+
"strings": true
71+
}
72+
```
73+
74+
<img src="https://raw.githubusercontent.com/speechmarkdown/speechmarkdown-vscode/master/images/enableperproject.png" width="50%" alt="Intellisense Directions"/>
75+

images/enableperproject.png

160 KB
Loading

images/hoverover.png

-1.54 KB
Loading

images/snippetsample01.gif

3.82 MB
Loading

images/snippetsample02.gif

-1.61 MB
Loading

images/syntaxhighlights.png

-94.3 KB
Loading

snippets.json

+112-25
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,109 @@
1616
"body": [
1717
"(${TM_SELECTED_TEXT})[date:'${1|mdy,dmy,ymd,ydm,md,dm,ym,my,y,m,d|}']"
1818
],
19-
"description": "Add a date modifier. Valid values are strong, moderate, reduced, none"
19+
"description": "Add a date modifier."
2020
},
21-
"alexa voice": {
22-
"prefix": "smd voice",
23-
"body": []
21+
"volume": {
22+
"prefix": "smd volume",
23+
"body": [
24+
"(${TM_SELECTED_TEXT})[volume:'${1|silent,x-soft,soft,medium,loud,x-loud|}']"
25+
],
26+
"description": "Add a volume modifier."
27+
},
28+
"disappointed": {
29+
"prefix": "smd disappointed",
30+
"body": ["(${TM_SELECTED_TEXT})[disappointed:'${1|low,medium,high|}']"],
31+
"description": "Add a disappointed modifier."
32+
},
33+
34+
"time": {
35+
"prefix": "smd time",
36+
"body": ["(${TM_SELECTED_TEXT})[date:'${1|hms12,hms24|}']"],
37+
"description": "Add a time modifier."
38+
},
39+
40+
"lang": {
41+
"prefix": "smd lang",
42+
"body": [
43+
"(${TM_SELECTED_TEXT})[lang:'${1|en-US,en-AU,en-GB,en-IN,de-DE,es-ES,it-IT,ja-JP,fr-FR||}']"
44+
],
45+
"description": "Add a lang modifier."
46+
},
47+
"ordinal": {
48+
"prefix": "smd lang",
49+
"body": ["(${TM_SELECTED_TEXT})[ordinal]"],
50+
"description": "Add an ordinal modifier."
51+
},
52+
"dj": {
53+
"prefix": "smd voice dj",
54+
"body": ["#[dj]"],
55+
"description": "Change the voice to a dj voice"
2456
},
2557
"default voice": {
26-
"prefix": "smd default voice",
27-
"body": ["#[voice:'default']"],
28-
"description": "default voice"
58+
"prefix": "smd voice default",
59+
"body": ["#[defaults]"],
60+
"description": "switch to the default voice for the platform"
61+
},
62+
"newscaster": {
63+
"prefix": "smd voice newscaster",
64+
"body": ["#[newscaster]"],
65+
"description": "switch to a newscaster voice"
2966
},
3067
"address": {
3168
"prefix": "smd address",
3269
"body": "(${TM_SELECTED_TEXT})[address]",
3370
"description": "Apply the address modifier to the selected text."
3471
},
72+
"cardinal": {
73+
"prefix": "smd cardinal",
74+
"body": "(${TM_SELECTED_TEXT})[cardinal]",
75+
"description": "Apply the cardinal modifier to the selected text."
76+
},
77+
"expletive": {
78+
"prefix": "smd expletive",
79+
"body": "(${TM_SELECTED_TEXT})[expletive]",
80+
"description": "Apply the expletive modifier to the selected text."
81+
},
82+
"bleep": {
83+
"prefix": "smd bleep",
84+
"body": "(${TM_SELECTED_TEXT})[bleep]",
85+
"description": "Apply the bleep modifier to the selected text."
86+
},
87+
"unit": {
88+
"prefix": "smd unit",
89+
"body": "(${TM_SELECTED_TEXT})[unit]",
90+
"description": "Apply the unit modifier to the selected text."
91+
},
92+
"sub": {
93+
"prefix": "smd sub",
94+
"body": "(${TM_SELECTED_TEXT})[sub:'${1:spokenword}']",
95+
"description": "Apply the sub modifier to the selected text."
96+
},
97+
"phone": {
98+
"prefix": "smd phone",
99+
"body": "(${TM_SELECTED_TEXT})[phone]",
100+
"description": "Apply the phone modifier to the selected text."
101+
},
102+
"interjection": {
103+
"prefix": "smd interjection",
104+
"body": "(${TM_SELECTED_TEXT})[interjection]",
105+
"description": "Apply the interjection modifier to the selected text."
106+
},
107+
"fraction": {
108+
"prefix": "smd fraction",
109+
"body": "(${TM_SELECTED_TEXT})[fraction]",
110+
"description": "Apply the fraction modifier to the selected text."
111+
},
112+
"characters": {
113+
"prefix": "smd characters",
114+
"body": "(${TM_SELECTED_TEXT})[characters]",
115+
"description": "Apply the characters modifier to the selected text."
116+
},
117+
"ipa": {
118+
"prefix": "smd ipa",
119+
"body": "(${TM_SELECTED_TEXT})[ipa:'#{1:phoneme}']",
120+
"description": "Apply the ipa modifier."
121+
},
35122
"pitch": {
36123
"prefix": "smd pitch",
37124
"body": "(${TM_SELECTED_TEXT})[pitch:'${1|x-low,low,medium,high,x-high|}']",
@@ -44,73 +131,73 @@
44131
},
45132
"audio": {
46133
"prefix": "smd audio",
47-
"body": "!['${TM_SELECTED_TEXT}']",
48-
"description": "Apply the audio modifier to the selected url to the audio file."
134+
"body": "!['${1:audiolink}']",
135+
"description": "Apply the audio tag"
49136
},
50137
"whisper": {
51138
"prefix": "smd whisper",
52139
"body": "(${TM_SELECTED_TEXT})[whisper]",
53140
"description": "Apply the whisper modifier to the selected text."
54141
},
55-
"cardinal": {
56-
"prefix": "smd cardinal",
57-
"body": "(${TM_SELECTED_TEXT})[cardinal]",
58-
"description": "Apply the c|ardinal modifier to the selected text."
142+
"number": {
143+
"prefix": "smd number",
144+
"body": "(${TM_SELECTED_TEXT})[number]",
145+
"description": "Apply the number modifier to the selected text."
59146
},
60147
"break ms": {
61-
"prefix": "smd break ms",
62-
"body": "[${1:int}ms]",
148+
"prefix": "smd break short",
149+
"body": "[${1:integer}ms]",
63150
"description": "Enter a break tag using milliseconds"
64151
},
65152
"break strength": {
66-
"prefix": "smd break strength",
153+
"prefix": "smd break",
67154
"body": "[break:'${1|none,x-weak,weak,medium,strong,x-strong|}']",
68155
"description": "Enter a break tag using strength"
69156
},
70157

71158
"voice en-US": {
72159
"prefix": "smd voice en-US",
73-
"body": "#[voice:'${1|Ivy,Joanna,Joey,Justin,Kendra,Kimberly,Matthew|}';lang='en-US']",
160+
"body": "#[voice:'${1|Ivy,Joanna,Joey,Justin,Kendra,Kimberly,Matthew|}';lang:'en-US']",
74161
"description": "Apply voice modifier and limit to en-US Alexa voices"
75162
},
76163
"voice en-UK": {
77164
"prefix": "smd voice en-GB",
78-
"body": "#[voice:'${1|Amy,Brian,Emma|}';lang='en-GB']",
165+
"body": "#[voice:'${1|Amy,Brian,Emma|}';lang:'en-GB']",
79166
"description": "Apply voice modifier and limit to en-GB Alexa voices"
80167
},
81168
"voice en-AU": {
82169
"prefix": "smd voice en-AU",
83-
"body": "#[voice:'${1|Salli,Russell|}';lang='en-AU']",
170+
"body": "#[voice:'${1|Salli,Russell|}';lang:'en-AU']",
84171
"description": "Apply voice modifier and limit to en-AU Alexa voices"
85172
},
86173
"voice en-IN": {
87174
"prefix": "smd voice en-IN",
88-
"body": "#[voice:'${1|Aditi,Raveena|}';lang='en-IN']",
175+
"body": "#[voice:'${1|Aditi,Raveena|}';lang:'en-IN']",
89176
"description": "Apply voice modifier and limit to en-IN Alexa voices"
90177
},
91178
"voice de-DE": {
92179
"prefix": "smd voice de-DE",
93-
"body": "#[voice:'${1|Hans,Marlene,Vicki|}';lang='de-DE']",
180+
"body": "#[voice:'${1|Hans,Marlene,Vicki|}';lang:'de-DE']",
94181
"description": "Apply voice modifier and limit to de-DE Alexa voices"
95182
},
96183
"voice es-ES": {
97184
"prefix": "smd voice es-ES",
98-
"body": "#[voice:'${1|Conchita,Enrique|}';lang='es-ES']",
185+
"body": "#[voice:'${1|Conchita,Enrique|}';lang:'es-ES']",
99186
"description": "Apply voice modifier and limit to es-ES Alexa voices"
100187
},
101188
"voice it-IT": {
102189
"prefix": "smd voice it-IT",
103-
"body": "#[voice:'${1|Carla,Giorgio|}';lang='it-IT']",
190+
"body": "#[voice:'${1|Carla,Giorgio|}';lang:'it-IT']",
104191
"description": "Apply voice modifier and limit to it-IT Alexa voices"
105192
},
106193
"voice ja-JP": {
107194
"prefix": "smd voice ja-JP",
108-
"body": "#[voice:'${1|Mizuki,Takumi|}';lang='ja-JP']",
195+
"body": "#[voice:'${1|Mizuki,Takumi|}';lang:'ja-JP']",
109196
"description": "Apply voice modifier and limit to ja-JP Alexa voices"
110197
},
111198
"voice fr-FR": {
112199
"prefix": "smd voice fr-FR",
113-
"body": "#[voice:'${1|CelineLea,Mathieu|}';lang='fr-FR']",
200+
"body": "#[voice:'${1|CelineLea,Mathieu|}';lang:'fr-FR']",
114201
"description": "Apply voice modifier and limit to fr-FR Alexa voices"
115202
}
116203
}

speechmarkdown-vscode-0.0.3.vsix

-22.7 MB
Binary file not shown.

speechmarkdown-vscode-0.0.4.vsix

-22.7 MB
Binary file not shown.

0 commit comments

Comments
 (0)