Skip to content

Commit 73c1946

Browse files
authored
Merge pull request #10 from kaigouthro/main
Update pine.tmLanguage.json, And a few things with complewtions and typify now gets UDT's typified as well
2 parents f990175 + 62460e6 commit 73c1946

13 files changed

+10327
-2634
lines changed

.cursorrules

Whitespace-only changes.

config/language-configuration.json

Lines changed: 29 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,28 @@
11
{
2+
23
"comments": {
3-
"lineComment": "//",
4+
"lineComment": "//"
45
},
56
"brackets": [
6-
[
7-
"{",
8-
"}"
9-
],
10-
[
11-
"[",
12-
"]"
13-
],
14-
[
15-
"(",
16-
")"
17-
]
7+
["[", "]"],
8+
["(", ")"]
189
],
1910
"autoClosingPairs": [
20-
{
21-
"open": "{",
22-
"close": "}"
23-
},
24-
{
25-
"open": "[",
26-
"close": "]"
27-
},
28-
{
29-
"open": "(",
30-
"close": ")"
31-
},
32-
{
33-
"open": "array<",
34-
"close": ">"
35-
},
36-
{
37-
"open": "map<",
38-
"close": ">"
39-
},
40-
{
41-
"open": "matrix<",
42-
"close": ">"
43-
},
44-
{
45-
"open": "new<",
46-
"close": ">"
47-
},
48-
{
49-
"open": "'",
50-
"close": "'",
51-
"notIn": [
52-
"string",
53-
"comment"
54-
]
55-
},
56-
{
57-
"open": "\"",
58-
"close": "\"",
59-
"notIn": [
60-
"string"
61-
]
62-
},
11+
{ "open": "[", "close": "]" },
12+
{ "open": "(", "close": ")" },
13+
{ "open": "array<", "close": ">" },
14+
{ "open": "map<", "close": ">" },
15+
{ "open": "matrix<", "close": ">" },
16+
{ "open": "new<", "close": ">" },
17+
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
18+
{ "open": "\"", "close": "\"", "notIn": ["string"] }
6319
],
6420
"surroundingPairs": [
65-
[
66-
"<",
67-
">"
68-
],
69-
[
70-
"{",
71-
"}"
72-
],
73-
[
74-
"[",
75-
"]"
76-
],
77-
[
78-
"(",
79-
")"
80-
],
81-
[
82-
"\"",
83-
"\""
84-
],
85-
[
86-
"'",
87-
"'"
88-
]
21+
["<", ">"],
22+
["[", "]"],
23+
["(", ")"],
24+
["\"", "\""],
25+
["'", "'"]
8926
],
9027
"folding": {
9128
"offSide": true,
@@ -95,16 +32,21 @@
9532
}
9633
},
9734
"indentationRules": {
98-
"increaseIndentPattern": "^\\s*((?:export\\s+)type|if|for|while|else|switch|.*=\\s*if\\s*|.*for\\s+.+in|.*=\\s*for)\\b.*$|.+=>\\s*$",
35+
"increaseIndentPattern": "(?<=^)(((\\s*(\\w+(?:\\.\\w+)*\\s*[\\-+\\/%:*]?=\\s*)?(if|for|while|switch)\\b)|(?:(?<=export\\s|method\\s)|(?<=^)\\s*)?\\w+\\s*\\([^\\)]*?\\)\\s*=>(?=\\/\\/|$|\\n)|\\s+.*?=>\\s*(?=\\/\\/|$|\\n)|(?:export\\s+)?(?:enum|type)))",
9936
"decreaseIndentPattern": "^\\s*(else if.+|else)\\s*$"
10037
},
10138
"onEnterRules": [
10239
{
103-
"beforeText": "^\\s*(continue|break)\\s*$",
104-
"action": {
105-
"indent": "outdent"
106-
}
40+
"beforeText": "^\\s*(if|for|while|switch|.*=>|.*\\)\\s*=>)",
41+
"indentAction": "indent"
42+
},
43+
{
44+
"beforeText": "^\\s*else",
45+
"indentAction": "outdent"
10746
},
108-
47+
{
48+
"beforeText": "^\\s*(continue|break)",
49+
"indentAction": "outdent"
50+
}
10951
]
110-
}
52+
}

package.json

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"version": "0.1.7",
1111
"type": "commonjs",
1212
"engines": {
13-
"vscode": "^1.85.0",
13+
"vscode": "^1.93.0",
1414
"node": ">=16.0.0"
1515
},
1616
"categories": [
@@ -37,13 +37,14 @@
3737
"secrets": true
3838
},
3939
"scripts": {
40-
"build-docs": "typedoc --name 'Pine Script v5'",
41-
"vscode:prepublish": "npm run compile",
42-
"compile": "webpack --devtool source-map --mode development",
43-
"watch": "webpack --watch",
44-
"compile-tests": "tsc -p . --outDir out",
45-
"watch-tests": "tsc -p . -w --outDir out",
46-
"lint": "eslint src --ext ts",
40+
"webpack": "webpack --devtool source-map --mode development",
41+
"compile": "pnpm run webpack",
42+
"start": "pnpm run compile && code --extensionDevelopmentPath=.",
43+
"build-docs": "pnpm run typedoc --name 'Pine Script v5'",
44+
"vscode:prepublish": "pnpm run compile",
45+
"compile-tests": "pnpm run tsc -p . --outDir out",
46+
"watch-tests": "pnpm run tsc -p . -w --outDir out",
47+
"lint": "pnpm run eslint src --ext ts",
4748
"vsce-package": "vsce package -o pinescriptv5.vsix"
4849
},
4950
"main": "./dist/extension.js",
@@ -156,11 +157,11 @@
156157
"submenus": [
157158
{
158159
"id": "pine.mysubmenuNonPineFile",
159-
"label": "Pine Script v5"
160+
"label": " Pine Script v5"
160161
},
161162
{
162163
"id": "pine.mysubmenu2",
163-
"label": "Pine Script v5"
164+
"label": " Pine Script v5"
164165
}
165166
],
166167
"commands": [
@@ -316,31 +317,35 @@
316317
]
317318
},
318319
"dependencies": {
319-
"debounce": "^2.0.0",
320+
"debounce": "^2.1.1",
320321
"lodash": "^4.17.21",
321322
"node-fetch": "^3.3.2"
322323
},
323324
"devDependencies": {
324325
"@types/debounce": "^1.2.4",
325-
"@types/lodash": "^4.14.202",
326-
"@types/node": "^20.10.6",
326+
"@types/lodash": "^4.17.7",
327+
"@types/node": "^22.5.4",
327328
"@types/source-map-support": "^0.5.10",
328-
"@types/vscode": "^1.85.0",
329-
"@typescript-eslint/eslint-plugin": "^6.16.0",
330-
"@typescript-eslint/parser": "^6.16.0",
329+
"@types/vscode": "^1.93.0",
330+
"@typescript-eslint/eslint-plugin": "^7.0.0",
331+
"@typescript-eslint/parser": "^7.0.0",
332+
"@vscode/vsce": "^3.1.0",
331333
"eslint": "^8.56.0",
332334
"eslint-config-airbnb": "^19.0.4",
333-
"eslint-config-airbnb-typescript": "^17.1.0",
334-
"eslint-plugin-import": "^2.29.1",
335-
"eslint-plugin-jsx-a11y": "^6.8.0",
336-
"eslint-plugin-react": "^7.33.2",
337-
"eslint-plugin-react-hooks": "^4.6.0",
338-
"nodemon": "^3.0.3",
335+
"eslint-config-airbnb-typescript": "^18.0.0",
336+
"eslint-plugin-import": "^2.30.0",
337+
"eslint-plugin-jsx-a11y": "^6.10.0",
338+
"eslint-plugin-react": "^7.35.2",
339+
"eslint-plugin-react-hooks": "^4.6.2",
340+
"nodemon": "^3.1.4",
341+
"remark-preset-wooorm": "^9.0.0",
339342
"source-map-support": "^0.5.21",
340343
"ts-loader": "^9.5.1",
341-
"typedoc": "^0.25.6",
342-
"typescript": "^5.3.3",
343-
"webpack": "^5.89.0",
344-
"webpack-cli": "^5.1.4"
344+
"type-coverage": "^2.0.0",
345+
"typedoc": "^0.26.7",
346+
"typescript": "^5.6.2",
347+
"webpack": "^5.94.0",
348+
"webpack-cli": "^5.1.4",
349+
"xo": "^0.54.0"
345350
}
346351
}

0 commit comments

Comments
 (0)