jupyterlab_code_formatter 2.0.0-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -0
- package/README.md +68 -0
- package/package.json +194 -0
- package/schema/settings.json +422 -0
- package/style/base.css +5 -0
- package/style/index.css +1 -0
- package/style/index.js +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2023 Ryan TAM
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
*A JupyterLab plugin to facilitate invocation of code formatters.*
|
|
4
|
+
|
|
5
|
+
PSA: This plugin is currently undergoing a major refactor, bear with me while I work on this.
|
|
6
|
+
|
|
7
|
+
----
|
|
8
|
+
|
|
9
|
+
Documentation: [Hosted on GitHub Pages](https://ryantam626.github.io/jupyterlab_code_formatter/index.html)
|
|
10
|
+
|
|
11
|
+
This is currently out of date. I will be updating that shortly.
|
|
12
|
+
|
|
13
|
+
----
|
|
14
|
+
|
|
15
|
+
## Demo
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
----
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
I recommend you going to the [documentation site](https://ryantam626.github.io/jupyterlab_code_formatter/index.html#quick-start), but this should work too.
|
|
24
|
+
|
|
25
|
+
1. **Install the package**
|
|
26
|
+
```bash
|
|
27
|
+
pip install jupyterlab-code-formatter
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
2. **Install some supported formatters** (isort+black are default for Python)
|
|
31
|
+
```bash
|
|
32
|
+
# NOTE: Install black and isort,
|
|
33
|
+
# JL code formatter is configured to invoke isort and black by default
|
|
34
|
+
pip install black isort
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
3. **Restart JupyterLab**
|
|
38
|
+
|
|
39
|
+
This plugin includes a server plugin, restart JupyterLab if you have followed the above steps while it's running.
|
|
40
|
+
|
|
41
|
+
4. **Configure plugin**
|
|
42
|
+
|
|
43
|
+
To configure which/how formatters are invoked, see [configuration](https://ryantam626.github.io/jupyterlab_code_formatter/configuration.html).
|
|
44
|
+
|
|
45
|
+
----
|
|
46
|
+
|
|
47
|
+
## Your Support
|
|
48
|
+
|
|
49
|
+
I could really use your support in giving me a star on GitHub, recommending features, fixing bugs or maybe even providing monetary support!
|
|
50
|
+
|
|
51
|
+
- [Recommending features via GitHub Issues](https://github.com/ryantam626/jupyterlab_code_formatter/issues)
|
|
52
|
+
- [Sumitting your PR on GitHub](https://github.com/ryantam626/jupyterlab_code_formatter/pulls)
|
|
53
|
+
- [Buy me a coffee](https://www.buymeacoffee.com/ryantam626)
|
|
54
|
+
- [Donating Via Solana](https://solana.com/): 6K7aK5RpskJkhEkwZi1ZQr68LhaVdfnTfWjZEQV3VbbD
|
|
55
|
+
|
|
56
|
+
----
|
|
57
|
+
|
|
58
|
+
## Contributors
|
|
59
|
+
|
|
60
|
+
Massive thanks to the below list of people who made past contributions to the project!
|
|
61
|
+
|
|
62
|
+
<a href="https://github.com/ryantam626/jupyterlab_code_formatter/graphs/contributors">
|
|
63
|
+
<img src="https://contrib.rocks/image?repo=ryantam626/jupyterlab_code_formatter" />
|
|
64
|
+
</a>
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
This project is licensed under the terms of the [MIT LICENSE](LICENSE) .
|
package/package.json
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jupyterlab_code_formatter",
|
|
3
|
+
"version": "2.0.0-rc1",
|
|
4
|
+
"description": " A JupyterLab plugin to facilitate invocation of code formatters.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jupyter",
|
|
7
|
+
"jupyterlab",
|
|
8
|
+
"jupyterlab-extension"
|
|
9
|
+
],
|
|
10
|
+
"homepage": " https://github.com/ryantam626/jupyterlab_code_formatter",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": " https://github.com/ryantam626/jupyterlab_code_formatter/issues"
|
|
13
|
+
},
|
|
14
|
+
"license": "BSD-3-Clause",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Ryan Tam",
|
|
17
|
+
"email": "ryantam626@gmail.com"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
21
|
+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
|
|
22
|
+
"schema/*.json"
|
|
23
|
+
],
|
|
24
|
+
"main": "lib/index.js",
|
|
25
|
+
"types": "lib/index.d.ts",
|
|
26
|
+
"style": "style/index.css",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": " https://github.com/ryantam626/jupyterlab_code_formatter.git"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "jlpm build:lib && jlpm build:labextension:dev",
|
|
33
|
+
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
|
|
34
|
+
"build:labextension": "jupyter labextension build .",
|
|
35
|
+
"build:labextension:dev": "jupyter labextension build --development True .",
|
|
36
|
+
"build:lib": "tsc --sourceMap",
|
|
37
|
+
"build:lib:prod": "tsc",
|
|
38
|
+
"clean": "jlpm clean:lib",
|
|
39
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
40
|
+
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
|
|
41
|
+
"clean:labextension": "rimraf jupyterlab_code_formatter/labextension jupyterlab_code_formatter/_version.py",
|
|
42
|
+
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
|
|
43
|
+
"eslint": "jlpm eslint:check --fix",
|
|
44
|
+
"eslint:check": "eslint . --cache --ext .ts,.tsx",
|
|
45
|
+
"install:extension": "jlpm build",
|
|
46
|
+
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
|
|
47
|
+
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
|
|
48
|
+
"prettier": "jlpm prettier:base --write --list-different",
|
|
49
|
+
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
|
|
50
|
+
"prettier:check": "jlpm prettier:base --check",
|
|
51
|
+
"stylelint": "jlpm stylelint:check --fix",
|
|
52
|
+
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
|
|
53
|
+
"test": "jest --coverage",
|
|
54
|
+
"watch": "run-p watch:src watch:labextension",
|
|
55
|
+
"watch:src": "tsc -w",
|
|
56
|
+
"watch:labextension": "jupyter labextension watch ."
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@jupyterlab/application": "^3.1.0",
|
|
60
|
+
"@jupyterlab/settingregistry": "^3.1.0",
|
|
61
|
+
"@jupyterlab/coreutils": "^5.1.0",
|
|
62
|
+
"@jupyterlab/services": "^6.1.0",
|
|
63
|
+
"@jupyterlab/fileeditor": "^3.0.0",
|
|
64
|
+
"@jupyterlab/mainmenu": "^3.0.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@babel/core": "^7.0.0",
|
|
68
|
+
"@babel/preset-env": "^7.0.0",
|
|
69
|
+
"@jupyterlab/builder": "^3.1.0",
|
|
70
|
+
"@jupyterlab/testutils": "^3.0.0",
|
|
71
|
+
"@types/jest": "^26.0.0",
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^4.8.1",
|
|
73
|
+
"@typescript-eslint/parser": "^4.8.1",
|
|
74
|
+
"eslint": "^7.14.0",
|
|
75
|
+
"eslint-config-prettier": "^6.15.0",
|
|
76
|
+
"eslint-plugin-prettier": "^3.1.4",
|
|
77
|
+
"jest": "^26.0.0",
|
|
78
|
+
"mkdirp": "^1.0.3",
|
|
79
|
+
"npm-run-all": "^4.1.5",
|
|
80
|
+
"prettier": "^2.1.1",
|
|
81
|
+
"rimraf": "^3.0.2",
|
|
82
|
+
"stylelint": "^14.3.0",
|
|
83
|
+
"stylelint-config-prettier": "^9.0.4",
|
|
84
|
+
"stylelint-config-recommended": "^6.0.0",
|
|
85
|
+
"stylelint-config-standard": "~24.0.0",
|
|
86
|
+
"stylelint-prettier": "^2.0.0",
|
|
87
|
+
"typescript": "~4.1.3",
|
|
88
|
+
"ts-jest": "^26.0.0"
|
|
89
|
+
},
|
|
90
|
+
"sideEffects": [
|
|
91
|
+
"style/*.css",
|
|
92
|
+
"style/index.js"
|
|
93
|
+
],
|
|
94
|
+
"styleModule": "style/index.js",
|
|
95
|
+
"publishConfig": {
|
|
96
|
+
"access": "public"
|
|
97
|
+
},
|
|
98
|
+
"jupyterlab": {
|
|
99
|
+
"discovery": {
|
|
100
|
+
"server": {
|
|
101
|
+
"managers": [
|
|
102
|
+
"pip"
|
|
103
|
+
],
|
|
104
|
+
"base": {
|
|
105
|
+
"name": "jupyterlab_code_formatter"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"extension": true,
|
|
110
|
+
"outputDir": "jupyterlab_code_formatter/labextension",
|
|
111
|
+
"schemaDir": "schema"
|
|
112
|
+
},
|
|
113
|
+
"eslintIgnore": [
|
|
114
|
+
"node_modules",
|
|
115
|
+
"dist",
|
|
116
|
+
"coverage",
|
|
117
|
+
"**/*.d.ts",
|
|
118
|
+
"tests",
|
|
119
|
+
"**/__tests__",
|
|
120
|
+
"ui-tests"
|
|
121
|
+
],
|
|
122
|
+
"eslintConfig": {
|
|
123
|
+
"extends": [
|
|
124
|
+
"eslint:recommended",
|
|
125
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
126
|
+
"plugin:@typescript-eslint/recommended",
|
|
127
|
+
"plugin:prettier/recommended"
|
|
128
|
+
],
|
|
129
|
+
"parser": "@typescript-eslint/parser",
|
|
130
|
+
"parserOptions": {
|
|
131
|
+
"project": "tsconfig.json",
|
|
132
|
+
"sourceType": "module"
|
|
133
|
+
},
|
|
134
|
+
"plugins": [
|
|
135
|
+
"@typescript-eslint"
|
|
136
|
+
],
|
|
137
|
+
"rules": {
|
|
138
|
+
"@typescript-eslint/naming-convention": [
|
|
139
|
+
"error",
|
|
140
|
+
{
|
|
141
|
+
"selector": "interface",
|
|
142
|
+
"format": [
|
|
143
|
+
"PascalCase"
|
|
144
|
+
],
|
|
145
|
+
"custom": {
|
|
146
|
+
"regex": "^I[A-Z]",
|
|
147
|
+
"match": true
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"@typescript-eslint/no-unused-vars": [
|
|
152
|
+
"warn",
|
|
153
|
+
{
|
|
154
|
+
"args": "none"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
158
|
+
"@typescript-eslint/no-namespace": "off",
|
|
159
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
160
|
+
"@typescript-eslint/quotes": [
|
|
161
|
+
"error",
|
|
162
|
+
"single",
|
|
163
|
+
{
|
|
164
|
+
"avoidEscape": true,
|
|
165
|
+
"allowTemplateLiterals": false
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"curly": [
|
|
169
|
+
"error",
|
|
170
|
+
"all"
|
|
171
|
+
],
|
|
172
|
+
"eqeqeq": "error",
|
|
173
|
+
"prefer-arrow-callback": "error"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"prettier": {
|
|
177
|
+
"singleQuote": true,
|
|
178
|
+
"trailingComma": "none",
|
|
179
|
+
"arrowParens": "avoid",
|
|
180
|
+
"endOfLine": "auto"
|
|
181
|
+
},
|
|
182
|
+
"stylelint": {
|
|
183
|
+
"extends": [
|
|
184
|
+
"stylelint-config-recommended",
|
|
185
|
+
"stylelint-config-standard",
|
|
186
|
+
"stylelint-prettier/recommended"
|
|
187
|
+
],
|
|
188
|
+
"rules": {
|
|
189
|
+
"property-no-vendor-prefix": null,
|
|
190
|
+
"selector-no-vendor-prefix": null,
|
|
191
|
+
"value-no-vendor-prefix": null
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
{
|
|
2
|
+
"jupyter.lab.setting-icon-class": "jp-EditIcon",
|
|
3
|
+
"jupyter.lab.setting-icon-label": "Jupyterlab Code Formatter",
|
|
4
|
+
"title": "Jupyterlab Code Formatter",
|
|
5
|
+
"description": "Jupyterlab Code Formatter settings.",
|
|
6
|
+
"definitions": {
|
|
7
|
+
"preferences": {
|
|
8
|
+
"properties": {
|
|
9
|
+
"default_formatter": {
|
|
10
|
+
"properties": {
|
|
11
|
+
"python": {
|
|
12
|
+
"anyOf": [
|
|
13
|
+
{ "type": "string" },
|
|
14
|
+
{ "type": "array", "items": { "type": "string" } }
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"R": {
|
|
18
|
+
"anyOf": [
|
|
19
|
+
{ "type": "string" },
|
|
20
|
+
{ "type": "array", "items": { "type": "string" } }
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": true,
|
|
25
|
+
"type": "object"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"type": "object"
|
|
30
|
+
},
|
|
31
|
+
"black": {
|
|
32
|
+
"properties": {
|
|
33
|
+
"line_length": {
|
|
34
|
+
"type": "number"
|
|
35
|
+
},
|
|
36
|
+
"string_normalization": {
|
|
37
|
+
"type": "boolean"
|
|
38
|
+
},
|
|
39
|
+
"magic_trailing_comma": {
|
|
40
|
+
"type": "boolean"
|
|
41
|
+
},
|
|
42
|
+
"experimental_string_processing": {
|
|
43
|
+
"type": "boolean"
|
|
44
|
+
},
|
|
45
|
+
"preview": {
|
|
46
|
+
"type": "boolean"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"type": "object"
|
|
51
|
+
},
|
|
52
|
+
"isort": {
|
|
53
|
+
"properties": {
|
|
54
|
+
"profile": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
"ensure_newline_before_comments": {
|
|
58
|
+
"type": "boolean"
|
|
59
|
+
},
|
|
60
|
+
"force_to_top": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"line_length": {
|
|
64
|
+
"type": "number"
|
|
65
|
+
},
|
|
66
|
+
"wrap_length": {
|
|
67
|
+
"type": "number"
|
|
68
|
+
},
|
|
69
|
+
"sections": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": { "type": "string" }
|
|
72
|
+
},
|
|
73
|
+
"known_future_library": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": { "type": "string" }
|
|
76
|
+
},
|
|
77
|
+
"known_standard_library": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"items": { "type": "string" }
|
|
80
|
+
},
|
|
81
|
+
"known_third_party": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": { "type": "string" }
|
|
84
|
+
},
|
|
85
|
+
"known_first_party": {
|
|
86
|
+
"type": "array",
|
|
87
|
+
"items": { "type": "string" }
|
|
88
|
+
},
|
|
89
|
+
"multi_line_output": {
|
|
90
|
+
"type": "number"
|
|
91
|
+
},
|
|
92
|
+
"forced_separate": {
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"indent": {
|
|
96
|
+
"type": "number"
|
|
97
|
+
},
|
|
98
|
+
"length_sort": {
|
|
99
|
+
"type": "boolean"
|
|
100
|
+
},
|
|
101
|
+
"force_single_line": {
|
|
102
|
+
"type": "boolean"
|
|
103
|
+
},
|
|
104
|
+
"force_grid_wrap": {
|
|
105
|
+
"type": "number"
|
|
106
|
+
},
|
|
107
|
+
"default_section": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"import_heading_future": {
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
"import_heading_stdlib": {
|
|
114
|
+
"type": "string"
|
|
115
|
+
},
|
|
116
|
+
"import_heading_thirdparty": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"import_heading_firstparty": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"import_heading_localfolder": {
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
"balanced_wrapping": {
|
|
126
|
+
"type": "boolean"
|
|
127
|
+
},
|
|
128
|
+
"order_by_type": {
|
|
129
|
+
"type": "boolean"
|
|
130
|
+
},
|
|
131
|
+
"lines_after_imports": {
|
|
132
|
+
"type": "number"
|
|
133
|
+
},
|
|
134
|
+
"lines_between_types": {
|
|
135
|
+
"type": "number"
|
|
136
|
+
},
|
|
137
|
+
"combine_as_imports": {
|
|
138
|
+
"type": "boolean"
|
|
139
|
+
},
|
|
140
|
+
"combine_star": {
|
|
141
|
+
"type": "boolean"
|
|
142
|
+
},
|
|
143
|
+
"include_trailing_comma": {
|
|
144
|
+
"type": "boolean"
|
|
145
|
+
},
|
|
146
|
+
"use_parentheses": {
|
|
147
|
+
"type": "boolean"
|
|
148
|
+
},
|
|
149
|
+
"from_first": {
|
|
150
|
+
"type": "boolean"
|
|
151
|
+
},
|
|
152
|
+
"case_sensitive": {
|
|
153
|
+
"type": "boolean"
|
|
154
|
+
},
|
|
155
|
+
"force_alphabetical_sort": {
|
|
156
|
+
"type": "boolean"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"patternProperties": {
|
|
160
|
+
"^known_[a-z_]+": {
|
|
161
|
+
"type": "array",
|
|
162
|
+
"items": { "type": "string" }
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"additionalProperties": false,
|
|
166
|
+
"type": "object"
|
|
167
|
+
},
|
|
168
|
+
"yapf": {
|
|
169
|
+
"properties": {
|
|
170
|
+
"style_config": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"additionalProperties": false,
|
|
175
|
+
"type": "object"
|
|
176
|
+
},
|
|
177
|
+
"autopep8": {
|
|
178
|
+
"properties": {
|
|
179
|
+
"aggressive": {
|
|
180
|
+
"type": "number"
|
|
181
|
+
},
|
|
182
|
+
"max_line_length": {
|
|
183
|
+
"type": "number"
|
|
184
|
+
},
|
|
185
|
+
"ignore": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": {
|
|
188
|
+
"type": "string"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"select": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"items": {
|
|
194
|
+
"type": "string"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"experimental": {
|
|
198
|
+
"type": "boolean"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"additionalProperties": false,
|
|
202
|
+
"type": "object"
|
|
203
|
+
},
|
|
204
|
+
"ruff": {
|
|
205
|
+
"properties": {
|
|
206
|
+
"args": { "type": "array", "items": { "type": "string" } }
|
|
207
|
+
},
|
|
208
|
+
"additionalProperties": false,
|
|
209
|
+
"type": "object"
|
|
210
|
+
},
|
|
211
|
+
"formatR": {
|
|
212
|
+
"properties": {
|
|
213
|
+
"comment": {
|
|
214
|
+
"type": "boolean"
|
|
215
|
+
},
|
|
216
|
+
"blank": {
|
|
217
|
+
"type": "boolean"
|
|
218
|
+
},
|
|
219
|
+
"arrow": {
|
|
220
|
+
"type": "boolean"
|
|
221
|
+
},
|
|
222
|
+
"brace_newline": {
|
|
223
|
+
"type": "boolean"
|
|
224
|
+
},
|
|
225
|
+
"indent": {
|
|
226
|
+
"type": "number"
|
|
227
|
+
},
|
|
228
|
+
"wrap": {
|
|
229
|
+
"type": "boolean"
|
|
230
|
+
},
|
|
231
|
+
"width_cutoff": {
|
|
232
|
+
"type": "number"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"type": "object"
|
|
237
|
+
},
|
|
238
|
+
"styler": {
|
|
239
|
+
"properties": {
|
|
240
|
+
"scope": {
|
|
241
|
+
"type": "string"
|
|
242
|
+
},
|
|
243
|
+
"strict": {
|
|
244
|
+
"type": "boolean"
|
|
245
|
+
},
|
|
246
|
+
"indent_by": {
|
|
247
|
+
"type": "number"
|
|
248
|
+
},
|
|
249
|
+
"start_comments_with_one_space": {
|
|
250
|
+
"type": "boolean"
|
|
251
|
+
},
|
|
252
|
+
"math_token_spacing": {
|
|
253
|
+
"oneOf": [
|
|
254
|
+
{
|
|
255
|
+
"properties": {
|
|
256
|
+
"zero": {
|
|
257
|
+
"oneOf": [
|
|
258
|
+
{ "type": "string" },
|
|
259
|
+
{ "type": "array", "items": { "type": "string" } }
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
"one": {
|
|
263
|
+
"oneOf": [
|
|
264
|
+
{ "type": "string" },
|
|
265
|
+
{ "type": "array", "items": { "type": "string" } }
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"additionalProperties": false,
|
|
270
|
+
"type": "object"
|
|
271
|
+
},
|
|
272
|
+
{ "type": "string" }
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
"reindention": {
|
|
276
|
+
"oneOf": [
|
|
277
|
+
{
|
|
278
|
+
"properties": {
|
|
279
|
+
"regex_pattern": {
|
|
280
|
+
"type": "string"
|
|
281
|
+
},
|
|
282
|
+
"indention": {
|
|
283
|
+
"type": "number"
|
|
284
|
+
},
|
|
285
|
+
"comments_only": {
|
|
286
|
+
"type": "boolean"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"additionalProperties": false,
|
|
290
|
+
"type": "object"
|
|
291
|
+
},
|
|
292
|
+
{ "type": "string" }
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"additionalProperties": false,
|
|
297
|
+
"type": "object"
|
|
298
|
+
},
|
|
299
|
+
"astyle": {
|
|
300
|
+
"properties": {
|
|
301
|
+
"args": { "type": "array", "items": { "type": "string" } }
|
|
302
|
+
},
|
|
303
|
+
"additionalProperties": false,
|
|
304
|
+
"type": "object"
|
|
305
|
+
},
|
|
306
|
+
"formatOnSave": {
|
|
307
|
+
"additionalProperties": false,
|
|
308
|
+
"type": "boolean"
|
|
309
|
+
},
|
|
310
|
+
"cacheFormatters": {
|
|
311
|
+
"type": "boolean"
|
|
312
|
+
},
|
|
313
|
+
"suppressFormatterErrors": {
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"type": "boolean"
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"properties": {
|
|
319
|
+
"preferences": {
|
|
320
|
+
"title": "Code Formatter Preferences",
|
|
321
|
+
"description": "Preferences for this plugin",
|
|
322
|
+
"$ref": "#/definitions/preferences",
|
|
323
|
+
"default": {
|
|
324
|
+
"default_formatter": {
|
|
325
|
+
"python": ["isort", "black"],
|
|
326
|
+
"R": "formatR",
|
|
327
|
+
"rust": "rustfmt",
|
|
328
|
+
"c++11": "astyle"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"black": {
|
|
333
|
+
"title": "Black Config",
|
|
334
|
+
"description": "Config to be passed into black's format_str function call.",
|
|
335
|
+
"$ref": "#/definitions/black",
|
|
336
|
+
"default": {
|
|
337
|
+
"line_length": 88,
|
|
338
|
+
"string_normalization": true
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"yapf": {
|
|
342
|
+
"title": "YAPF Config",
|
|
343
|
+
"description": "Config to be passed into yapf's FormatCode function call.",
|
|
344
|
+
"$ref": "#/definitions/yapf",
|
|
345
|
+
"default": {
|
|
346
|
+
"style_config": "google"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"autopep8": {
|
|
350
|
+
"title": "Autopep8 Config",
|
|
351
|
+
"description": "Config to be passed into autopep8's fix_code function call as the options dictionary.",
|
|
352
|
+
"$ref": "#/definitions/autopep8",
|
|
353
|
+
"default": {}
|
|
354
|
+
},
|
|
355
|
+
"isort": {
|
|
356
|
+
"title": "Isort Config",
|
|
357
|
+
"description": "Config to be passed into isort's SortImports function call.",
|
|
358
|
+
"$ref": "#/definitions/isort",
|
|
359
|
+
"default": {
|
|
360
|
+
"multi_line_output": 3,
|
|
361
|
+
"include_trailing_comma": true,
|
|
362
|
+
"force_grid_wrap": 0,
|
|
363
|
+
"use_parentheses": true,
|
|
364
|
+
"ensure_newline_before_comments": true,
|
|
365
|
+
"line_length": 88
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"formatR": {
|
|
369
|
+
"title": "FormatR Config",
|
|
370
|
+
"description": "Config to be passed into formatR's tidy_source function call.",
|
|
371
|
+
"$ref": "#/definitions/formatR",
|
|
372
|
+
"default": {
|
|
373
|
+
"indent": 2,
|
|
374
|
+
"arrow": true,
|
|
375
|
+
"wrap": true,
|
|
376
|
+
"width_cutoff": 150
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"styler": {
|
|
380
|
+
"title": "Styler Config",
|
|
381
|
+
"description": "Config to be passed into styler's style_text function call.",
|
|
382
|
+
"$ref": "#/definitions/styler",
|
|
383
|
+
"default": {}
|
|
384
|
+
},
|
|
385
|
+
"formatOnSave": {
|
|
386
|
+
"title": "Auto format config",
|
|
387
|
+
"description": "Auto format code when save the notebook.",
|
|
388
|
+
"$ref": "#/definitions/formatOnSave",
|
|
389
|
+
"default": false
|
|
390
|
+
},
|
|
391
|
+
"cacheFormatters": {
|
|
392
|
+
"title": "Cache formatters",
|
|
393
|
+
"description": "Cache formatters on server for better performance (but will not detected newly installed/uninstalled formatters).",
|
|
394
|
+
"$ref": "#/definitions/cacheFormatters",
|
|
395
|
+
"default": false
|
|
396
|
+
},
|
|
397
|
+
"astyle": {
|
|
398
|
+
"title": "AStyle Config",
|
|
399
|
+
"description": "Command line options to be passed to astyle.",
|
|
400
|
+
"$ref": "#/definitions/astyle",
|
|
401
|
+
"default": {
|
|
402
|
+
"args": []
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
"ruff": {
|
|
406
|
+
"title": "Ruff Config",
|
|
407
|
+
"description": "Command line options to be passed to ruff.",
|
|
408
|
+
"$ref": "#/definitions/ruff",
|
|
409
|
+
"default": {
|
|
410
|
+
"args": ["--select=I"]
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"suppressFormatterErrors": {
|
|
414
|
+
"title": "Suppress formatter errors",
|
|
415
|
+
"description": "Whether to suppress all errors reported by formatter while formatting. Useful when you have format on save mode on.",
|
|
416
|
+
"$ref": "#/definitions/suppressFormatterErrors",
|
|
417
|
+
"default": false
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"additionalProperties": false,
|
|
421
|
+
"type": "object"
|
|
422
|
+
}
|
package/style/base.css
ADDED
package/style/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('base.css');
|
package/style/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './base.css';
|