forked from yankikucuk/pine-script-syntax-highlighter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
256 lines (256 loc) · 8.29 KB
/
Copy pathpackage.json
File metadata and controls
256 lines (256 loc) · 8.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
{
"name": "pine-script-syntax-highlighter",
"displayName": "Pine Script Syntax Highlighter",
"description": "Pine Script v6 for Visual Studio Code: highlighting, completion, hover documentation, signature help, snippets, themes and compiler diagnostics.",
"version": "3.4.0",
"publisher": "ex-codes",
"author": {
"name": "Yankı Küçük",
"url": "https://github.com/yankikucuk"
},
"license": "MIT",
"icon": "images/pinescript.png",
"galleryBanner": {
"color": "#131722",
"theme": "dark"
},
"homepage": "https://github.com/yankikucuk/pine-script-syntax-highlighter#readme",
"repository": {
"type": "git",
"url": "https://github.com/yankikucuk/pine-script-syntax-highlighter.git"
},
"bugs": {
"url": "https://github.com/yankikucuk/pine-script-syntax-highlighter/issues"
},
"qna": "https://github.com/yankikucuk/pine-script-syntax-highlighter/issues",
"engines": {
"vscode": "^1.96.0",
"node": ">=20"
},
"type": "module",
"categories": ["Programming Languages", "Snippets", "Themes", "Linters"],
"keywords": [
"pine",
"pinescript",
"pine script",
"tradingview",
"trading",
"indicator",
"strategy",
"syntax",
"highlighting",
"completion",
"hover",
"themes"
],
"contributes": {
"languages": [
{
"id": "pinescript",
"aliases": ["Pine Script", "pinescript", "Pine"],
"extensions": [".pine", ".pinescript"],
"firstLine": "^//@version=\\d+",
"configuration": "./language-configuration.json",
"icon": {
"light": "./images/pinescript.png",
"dark": "./images/pinescript.png"
}
}
],
"grammars": [
{
"language": "pinescript",
"scopeName": "source.pine",
"path": "./syntaxes/pinescript.tmLanguage.json"
}
],
"snippets": [
{
"language": "pinescript",
"path": "./snippets/pinescript.code-snippets"
}
],
"configurationDefaults": {
"[pinescript]": {
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.defaultFormatter": "ex-codes.pine-script-syntax-highlighter"
}
},
"configuration": {
"title": "Pine Script",
"properties": {
"pinescript.completion.enabled": {
"type": "boolean",
"default": true,
"description": "Suggest built-ins, keywords, user symbols and named arguments while typing."
},
"pinescript.hover.enabled": {
"type": "boolean",
"default": true,
"description": "Show documentation when hovering built-ins and user symbols."
},
"pinescript.signatureHelp.enabled": {
"type": "boolean",
"default": true,
"description": "Show parameter hints inside function calls."
},
"pinescript.libraries.local.include": {
"type": "string",
"default": "**/*.pine",
"description": "Glob for workspace files scanned for library() declarations."
},
"pinescript.libraries.remote": {
"type": "boolean",
"default": true,
"description": "Query TradingView for published libraries when completing import statements and hovering imports. Only the typed prefix and library ids are sent."
},
"pinescript.diagnostics.remote": {
"type": "boolean",
"default": false,
"description": "Send the document text to the TradingView compiler to show errors and warnings. Off by default because the full script leaves your machine."
},
"pinescript.format.enabled": {
"type": "boolean",
"default": true,
"description": "Format Pine documents on request, indenting blocks with four spaces and spacing operators and arguments."
},
"pinescript.lint.enabled": {
"type": "boolean",
"default": true,
"description": "Check the open document for problems without sending it anywhere: names left over from older versions, calls that only work at the top level, unknown or repeated arguments, and declarations that are never read."
},
"pinescript.lint.disabledRules": {
"type": "array",
"items": {
"type": "string",
"enum": [
"missing-version",
"old-version",
"legacy-name",
"local-scope-call",
"duplicate-argument",
"unknown-argument",
"unused-variable",
"unused-parameter",
"unused-import"
]
},
"default": [],
"description": "Rules the offline checker should not report."
}
}
},
"commands": [
{
"command": "pinescript.generateDocstring",
"title": "Pine Script: Generate Docstring",
"enablement": "editorLangId == pinescript"
},
{
"command": "pinescript.addTypeAnnotations",
"title": "Pine Script: Add Type Annotations",
"enablement": "editorLangId == pinescript"
},
{
"command": "pinescript.newIndicator",
"title": "Pine Script: New Indicator"
},
{
"command": "pinescript.newStrategy",
"title": "Pine Script: New Strategy"
},
{
"command": "pinescript.newLibrary",
"title": "Pine Script: New Library"
},
{
"command": "pinescript.openReference",
"title": "Pine Script: Open Reference"
},
{
"command": "pinescript.convertToV6",
"title": "Pine Script: Convert to v6",
"enablement": "editorLangId == pinescript"
}
],
"menus": {
"editor/context": [
{
"command": "pinescript.generateDocstring",
"when": "editorLangId == pinescript",
"group": "1_pinescript@1"
},
{
"command": "pinescript.addTypeAnnotations",
"when": "editorLangId == pinescript",
"group": "1_pinescript@2"
},
{
"command": "pinescript.openReference",
"when": "editorLangId == pinescript",
"group": "1_pinescript@3"
},
{
"command": "pinescript.convertToV6",
"when": "editorLangId == pinescript",
"group": "1_pinescript@4"
}
]
},
"themes": [
{
"label": "Pine Dark",
"uiTheme": "vs-dark",
"path": "./themes/pine-dark-color-theme.json"
},
{
"label": "Pine Light",
"uiTheme": "vs",
"path": "./themes/pine-light-color-theme.json"
}
]
},
"scripts": {
"build": "npm run build:grammar && npm run build:extension",
"build:grammar": "node scripts/build-grammar.mjs",
"build:grammar:check": "node scripts/build-grammar.mjs --check",
"build:extension": "node scripts/build-extension.mjs",
"watch": "node scripts/build-extension.mjs --watch",
"scrape:reference": "node scripts/scrape-reference.mjs",
"typecheck": "tsc --noEmit",
"test": "npm run build:grammar:check && npm run check:themes && npm run typecheck && npm run test:core && npm run test:unit && npm run test:snap",
"test:core": "vitest run",
"test:unit": "vscode-tmgrammar-test -g syntaxes/pinescript.tmLanguage.json \"tests/unit/**/*.pine\"",
"test:snap": "vscode-tmgrammar-snap -s source.pine -g syntaxes/pinescript.tmLanguage.json \"tests/snapshots/**/*.pine\"",
"test:snap:update": "npm run test:snap -- --updateSnapshot",
"format": "prettier --write .",
"format:check": "prettier --check .",
"package": "vsce package",
"publish": "vsce publish",
"vscode:prepublish": "npm test && npm run build:extension",
"check:themes": "node scripts/check-themes.mjs"
},
"devDependencies": {
"@types/node": "^22.20.1",
"@types/vscode": "1.96.0",
"@vscode/vsce": "^3.9.2",
"esbuild": "^0.28.2",
"prettier": "^3.9.6",
"typescript": "^5.9.3",
"vitest": "^5.0.0",
"vscode-tmgrammar-test": "^0.1.3"
},
"main": "./dist/extension.cjs",
"activationEvents": ["onLanguage:pinescript"],
"capabilities": {
"untrustedWorkspaces": {
"supported": true
},
"virtualWorkspaces": {
"supported": "limited",
"description": "Workspace library discovery needs files on disk."
}
}
}