Skip to content

Commit a0ed7cf

Browse files
committed
Added YAML hover over support.
Updated readme
1 parent fa7f929 commit a0ed7cf

6 files changed

+54
-14
lines changed

CHANGELOG.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
- Support for Speech Markdown YAML syntax highlighting
11-
- Syntax highlighing for short form Speech Markdown (e.g. emphasis, break, etc.)
10+
- Known issue with phonemes in ipa tags that include quotes
11+
- Syntax highlighing for short form Speech Markdown for emphasis
12+
- Completion handlers for JSON, YAML, JavaScript, and TypeScript
1213

13-
## [0.0.3] - 2020-02-16
14+
## [0.0.5] - 2020-02-23
15+
16+
- Added snippets for all formatting tags
17+
- Added an indicator in hover over text for Bixby support
18+
- Updated ReadMe documentation to show how to enabled IntelliSense in strings for JavaScript and TypeScript
19+
- Significant updates to tighten the Speech Markdown grammar by using targeted Regular Expressions
20+
- Added syntax highlighting for audio tag
21+
- Added hover over support for YAML
22+
23+
## [0.0.4] - 2020-02-22
24+
25+
- Added YAML syntax highlighting support for Speech Markdown
26+
27+
## [0.0.3] - 2020-02-18
1428

1529
- listing Bixby in hover over information
1630

README.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,23 @@ This extentsion supports snippets, hover-over, syntax highlighting of Speech Mar
66

77
## Features
88

9-
<img src="https://raw.githubusercontent.com/speechmarkdown/speechmarkdown-vscode/master/images/smd-demo-1.gif" width="50%" alt="Speech Markdown Visual Studio Code Sample"/>
9+
- Syntax Highlighting
10+
- Hover over informational text
11+
- Comprehensive Snippets
12+
13+
<img src="https://raw.githubusercontent.com/speechmarkdown/speechmarkdown-vscode/master/images/smd-demo-1.gif" width="75%" alt="Speech Markdown Visual Studio Code Sample"/>
1014

1115
### Syntax Highlighting
1216

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

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

1721
Languages that support Speech Markdown syntax highlighting are:
1822

1923
- JavaScript
20-
- JSON
2124
- TypeScript
25+
- JSON
2226
- YAML (new)
2327

2428
### Hover Over
@@ -29,7 +33,7 @@ Hover over the mark up text for additional information.
2933

3034
### Snippets
3135

32-
All Speech Markdown snippets start with "smd."
36+
All Speech Markdown snippets start with "smd."
3337

3438
There are two approaches to applying snippets.
3539

@@ -48,15 +52,16 @@ There are two approaches to applying snippets.
4852
2. Type "smd" and use _ctrl+space bar_
4953
3. Select the snippet
5054

51-
<img src="https://raw.githubusercontent.com/speechmarkdown/speechmarkdown-vscode/master/images/snippetsample02.gif" width="50%" alt="Snippet text selection"/>
55+
<img src="https://raw.githubusercontent.com/speechmarkdown/speechmarkdown-vscode/master/images/snippetsample02.gif" width="65%" alt="Snippet text selection"/>
5256

53-
#### Enable Intellisense in TypeScript and JavaScript
57+
#### Enable Intellisense in TypeScript, JavaScript
5458

5559
By default Visual Studio Code does not provide IntelliSense handling in strings. For more information, please see:
5660

5761
[TS/JS Path Quick Suggestion IntelliSense Does Not Work Unless QuickSuggestions.strings is enabled #23962](https://github.com/microsoft/vscode/issues/23962)
5862

59-
__NOTE:__ IntelliSense in strings is _not_ available in JSON or YAML.
63+
**NOTE:** IntelliSense in strings is _not_ available in JSON or YAML. If you wish to use Intellisense
64+
in JSON files you can temporarily change the file extension to _js_.
6065

6166
If you wish to enabled IntelliSense in strings, then apply the following settings to your project folder.
6267

@@ -71,5 +76,8 @@ If you wish to enabled IntelliSense in strings, then apply the following setting
7176
}
7277
```
7378

74-
<img src="https://raw.githubusercontent.com/speechmarkdown/speechmarkdown-vscode/master/images/enableperproject.png" width="50%" alt="Intellisense Directions"/>
79+
<img src="https://raw.githubusercontent.com/speechmarkdown/speechmarkdown-vscode/master/images/enableperproject.png" width="80%" alt="Intellisense Directions"/>
80+
81+
Once configured, then IntelliSense works in JavaScript and TypeScript:
7582

83+
<img src="https://raw.githubusercontent.com/speechmarkdown/speechmarkdown-vscode/master/images/snippetsample02.gif" width="80%" alt="IntelliSense Sample Snippets"/>

images/smd-demo-1.gif

-17.5 KB
Loading

images/snippetssample03.gif

4.7 MB
Loading

src/extension.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ export function activate(context: vscode.ExtensionContext) {
2121
);
2222

2323
context.subscriptions.push(
24-
vscode.languages.registerCompletionItemProvider("json", jsCentralProvider)
24+
vscode.languages.registerHoverProvider("yaml", jsCentralProvider)
2525
);
2626
/*
27+
context.subscriptions.push(
28+
vscode.languages.registerCompletionItemProvider("json", jsCentralProvider)
29+
);
30+
2731
context.subscriptions.push(
2832
vscode.languages.registerCompletionItemProvider(
2933
"typescript",

syntaxes/text.speechmarkdown.injection.json

+16-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
{ "include": "#break-short-expession" },
2323
{ "include": "#complex-modifier-expression" },
2424
{ "include": "#simple-sub-expression" },
25-
{ "include": "#ipa-short-expression" }
25+
{ "include": "#ipa-short-expression" },
26+
{ "include": "#section-excited-expression" }
2627
]
2728
},
2829
"audio-expression": {
@@ -51,13 +52,26 @@
5152

5253
"section-expression": {
5354
"name": "meta.section.speechmarkdown",
54-
"match": "(#\\[)(disappointed|dj|excited|newscaster|defaults)(\\])",
55+
"match": "(#\\[)(disappointed|dj|newscaster|defaults)(\\])",
5556
"captures": {
5657
"1": { "name": "meta.embedded.meta.brace.speechmarkdown.open" },
5758
"2": { "name": "entity.name.function.speechmarkdown.modifier" },
5859
"3": { "name": "meta.embedded.brace.speechmarkdown.close" }
5960
}
6061
},
62+
"section-excited-expression": {
63+
"name": "meta.section.speechmarkdown",
64+
"match": "(#\\[)(excited)(:)?(\"|')?(low|medium|high)?(\"|')?(\\])",
65+
"captures": {
66+
"1": { "name": "meta.embedded.meta.brace.speechmarkdown.open" },
67+
"2": { "name": "entity.name.function.speechmarkdown.modifier" },
68+
"3": { "name": "meta.embedded.meta.assigment.speechmarkdown" },
69+
"4": { "name": "meta.embedded.meta.quote.speechmarkdown" },
70+
"5": { "name": "variable.speechmarkdown" },
71+
"6": { "name": "meta.embedded.meta.quote.speechmarkdown" },
72+
"7": { "name": "meta.embedded.brace.speechmarkdown.close" }
73+
}
74+
},
6175
"simple-sub-expression": {
6276
"match": "(\\()([^)]+)(\\))(\\[)(\"|')([^)\"']+)(\"|')(\\])",
6377
"name": "meta.modifier.speechmarkdown",

0 commit comments

Comments
 (0)