Skip to content

Commit ffc0649

Browse files
committed
Merge branch 'develop'
2 parents 915cdcd + 6611182 commit ffc0649

15 files changed

Lines changed: 168 additions & 99 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.1 (July 14, 2020)
2+
- node module languageserver/client update
3+
- Multiline keyword description
4+
15
## 0.2.0 (July 12, 2020)
26
- Multi-Root Workspace
37
- Custom Keywords (symbol, semantic scope, description)

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Fanuc Macro Executor syntax highlighting, validating and project building
1212

1313
## News
1414
- [Multi-Root Workspaces](#multi-root-workspaces)
15-
- [Custom Keywords](#Customization)
15+
- [Custom Keywords](#custom-Keywords)
1616

1717
***
1818
@@ -89,7 +89,7 @@ The global / local search behavior is equal to the reference search.
8989

9090
Semantic highlighting is used to highlight the represented type of a symbol. Following types are supported:
9191
* M-Code and G-Code
92-
* PMC Address
92+
* Address
9393
* Macro variable
9494
* Constant
9595
* Label
@@ -109,7 +109,7 @@ For some color themes, the semantic highlighting must be enabled in the settings
109109

110110
*The color theme used in screenshot →* **[Noctis](https://marketplace.visualstudio.com/items?itemName=liviuschera.noctis#review-details)**
111111

112-
## Customization
112+
## Custom Keywords
113113

114114
* Symbol highlighting
115115
* Symbol description for hover and completion
@@ -123,10 +123,10 @@ Such a customization can be achieved by adding custom keyword items to the confi
123123
| symbol | Symbol text |
124124
| scope | [Scopes](#Scopes) |
125125
| nodeType | Label, Code (M/G), Variable (all @ symbols) |
126-
| description | Markdown string |
126+
| description | Markdown `string` \| `string[]` |
127127

128128

129-
The field `nodeType` defines the related type in the macro program. If the field is empty, a keyword item affects all symbol occurrences regardless of the symbols type. E.g. if you want to add a hower text to a particular P-Code variable, an item could be structed as follows:
129+
The field `nodeType` defines the related type in the macro program. If the field is empty, a keyword item affects all symbol occurrences regardless of the symbols type. E.g. if you want to add a hover text to a particular P-Code variable, an item could be structed as follows:
130130

131131
```json
132132
{
@@ -149,7 +149,7 @@ The field `nodeType` defines the related type in the macro program. If the field
149149
| address | Address |
150150

151151

152-
These scopes are used internally and are responsible for the colorization which depends on the chosen color theme like **[Noctis](https://marketplace.visualstudio.com/items?itemName=liviuschera.noctis#review-details)**. To override the colorization just add **[rules](https://github.com/microsoft/vscode/wiki/Semantic-Highlighting-Overview#as-a-theme-author-do-i-need-to-change-my-theme-to-make-it-work-with-semantic-highlighting)** to the `editor.semanticTokenColorCustomizations` configuration property.
152+
These scopes are used internally and are responsible for the symbol style which depends on the chosen color theme like **[Noctis](https://marketplace.visualstudio.com/items?itemName=liviuschera.noctis#review-details)**. To override the style just add **[rules](https://github.com/microsoft/vscode/wiki/Semantic-Highlighting-Overview#as-a-theme-author-do-i-need-to-change-my-theme-to-make-it-work-with-semantic-highlighting)** to the `editor.semanticTokenColorCustomizations` configuration property.
153153

154154
In case the default scopes should be unchanged, the additional custom scopes `custom_1` - `custom_5` could be used:
155155

@@ -163,7 +163,7 @@ The following example changes the symbol `M08`, which has a default scope `code`
163163
{
164164
"symbol": "M08",
165165
"scope": "custom_1",
166-
"description": "*Coolant*"
166+
"description": ["*Coolant*", "ON"]
167167
}
168168
],
169169

@@ -228,6 +228,7 @@ Three levels are supported: `error`, `warning` and `ignore`.
228228

229229
This extension contributes the following settings:
230230

231+
* `macro.keywords` : [Custom Keywords](#custom-Keywords)
231232
* `macro.lint`: Lint settings and rule configuration
232233
* `macro.sequence.base`: Sequences start number for refactoring
233234
* `macro.sequence.increment`: Sequences increment for refactoring

client/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"vscode": "^1.45.1"
1414
},
1515
"dependencies": {
16-
"vscode-languageclient": "7.0.0-next.1",
16+
"vscode-languageclient": "7.0.0-next.5",
1717
"rxjs": "^6.5.5",
1818
"vscode-nls": "^4.1.2"
1919
},

client/src/extension.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import {
77
LanguageClient, LanguageClientOptions,
88
ServerOptions, TransportKind, RevealOutputChannelOn,
99
ExecuteCommandSignature, WorkspaceFolder
10-
} from 'vscode-languageclient';
10+
} from 'vscode-languageclient/node';
11+
1112

1213
import * as ls from 'vscode-languageserver-protocol';
1314

14-
import { SemanticTokensFeature, DocumentSemanticsTokensSignature } from 'vscode-languageclient/lib/semanticTokens.proposed';
15+
import { SemanticTokensFeature, DocumentSemanticsTokensSignature } from 'vscode-languageclient/lib/common/semanticTokens.proposed';
1516
import registerCommands from './common/commands';
1617

1718
import CompositeDisposable from './common/compositeDisposable';

doc/settings.example.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,17 @@
99

1010
"macro.keywords": [
1111

12-
{"symbol": "10000", "scope":"number", "nodeType": "Variable", "description": "Base address"},
12+
{
13+
"symbol": "10000",
14+
"scope":"number",
15+
"nodeType": "Variable",
16+
"description": [
17+
"# some",
18+
"*markdown*",
19+
"text",
20+
"lines"
21+
]
22+
},
1323

1424
{"symbol": "ret_arg", "scope":"symbol", "nodeType": "Variable"},
1525
{"symbol": "error_1", "scope":"custom_2", "nodeType": "Variable"},

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "macro-executor",
33
"displayName": "Macro Executor Language",
44
"description": "Fanuc Macro-Executor Programming Language",
5-
"version": "0.2.0",
5+
"version": "0.2.1",
66
"author": "iSorp",
77
"publisher": "iSorp",
88
"license": "MIT",
@@ -142,26 +142,25 @@
142142
"properties": {
143143
"macro.keywords": {
144144
"scope": "resource",
145-
"type" : "array",
145+
"type": "array",
146146
"description": "custom keywords",
147147
"items": {
148-
"type" :"object",
149-
"default" : {
148+
"type": "object",
149+
"default": {
150150
"symbol": "special symbol",
151-
"scope": "variable",
151+
"scope": "macrovar",
152152
"description": "this text will be shown on hover and completion"
153153
},
154-
"properties" : {
155-
"type" : "object",
154+
"properties": {
155+
"type": "object",
156156
"symbol": {
157-
"type" : "string"
157+
"type": "string"
158158
},
159159
"scope": {
160-
"type" : "string",
161-
"enum": [
160+
"type": "string",
161+
"enum": [
162162
"number",
163163
"macrovar",
164-
"symbol",
165164
"constant",
166165
"language",
167166
"label",
@@ -175,12 +174,10 @@
175174
"custom_5"
176175
]
177176
},
178-
"description": {
179-
"type" : "string"
180-
},
181-
"nodeType" : {
182-
"type" : "string",
183-
"enum": [
177+
"description": {},
178+
"nodeType": {
179+
"type": "string",
180+
"enum": [
184181
"",
185182
"Label",
186183
"Variable",

server/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"url": "https://github.com/iSorp/macro-executor.git"
1414
},
1515
"dependencies": {
16-
"vscode-languageserver": "7.0.0-next.1",
16+
"vscode-languageserver": "7.0.0-next.3",
1717
"vscode-languageserver-textdocument": "^1.0.1",
1818
"vscode-nls": "^4.1.2",
1919
"vscode-uri": "^2.1.2",

0 commit comments

Comments
 (0)