Skip to content

Commit 09649a9

Browse files
bors[bot]matklad
andauthored
Merge #2696
2696: Reformat with tsfmt r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 parents e6a1ccc + 04f0f50 commit 09649a9

File tree

7 files changed

+98
-44
lines changed

7 files changed

+98
-44
lines changed

editors/code/package-lock.json

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

editors/code/package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"vscode:prepublish": "rollup -c",
2020
"package": "vsce package",
2121
"watch": "tsc -watch -p ./",
22-
"prettier": "prettier --write '**/*.ts'"
22+
"fmt": "tsfmt -r"
2323
},
2424
"dependencies": {
2525
"jsonc-parser": "^2.1.0",
@@ -33,17 +33,12 @@
3333
"@types/node": "^12.12.21",
3434
"@types/seedrandom": "^2.4.28",
3535
"@types/vscode": "^1.41.0",
36-
"prettier": "^1.19.1",
3736
"rollup": "^1.27.14",
3837
"tslib": "^1.10.0",
3938
"typescript": "^3.7.3",
39+
"typescript-formatter": "^7.2.2",
4040
"vsce": "^1.71.0"
4141
},
42-
"prettier": {
43-
"singleQuote": true,
44-
"tabWidth": 4,
45-
"trailingComma": "all"
46-
},
4742
"activationEvents": [
4843
"onLanguage:rust",
4944
"onCommand:rust-analyzer.analyzerStatus",

editors/code/src/commands/syntax_tree.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ class TextDocumentContentProvider
8585
range = editor.selection.isEmpty
8686
? undefined
8787
: this.ctx.client.code2ProtocolConverter.asRange(
88-
editor.selection,
89-
);
88+
editor.selection,
89+
);
9090
}
9191

9292
const request: SyntaxTreeParams = {

editors/code/src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ export class Config {
171171
(this.cargoFeatures.allFeatures !==
172172
this.prevCargoFeatures.allFeatures ||
173173
this.cargoFeatures.noDefaultFeatures !==
174-
this.prevCargoFeatures.noDefaultFeatures ||
174+
this.prevCargoFeatures.noDefaultFeatures ||
175175
this.cargoFeatures.features.length !==
176-
this.prevCargoFeatures.features.length ||
176+
this.prevCargoFeatures.features.length ||
177177
this.cargoFeatures.features.some(
178178
(v, i) => v !== this.prevCargoFeatures!.features[i],
179179
))

editors/code/src/highlighting.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -151,32 +151,32 @@ class Highlighter {
151151
string,
152152
vscode.TextEditorDecorationType,
153153
]> = [
154-
decoration('comment'),
155-
decoration('string'),
156-
decoration('keyword'),
157-
decoration('keyword.control'),
158-
decoration('keyword.unsafe'),
159-
decoration('function'),
160-
decoration('parameter'),
161-
decoration('constant'),
162-
decoration('type.builtin'),
163-
decoration('type.generic'),
164-
decoration('type.lifetime'),
165-
decoration('type.param'),
166-
decoration('type.self'),
167-
decoration('type'),
168-
decoration('text'),
169-
decoration('attribute'),
170-
decoration('literal'),
171-
decoration('literal.numeric'),
172-
decoration('literal.char'),
173-
decoration('literal.byte'),
174-
decoration('macro'),
175-
decoration('variable'),
176-
decoration('variable.mut', 'underline'),
177-
decoration('field'),
178-
decoration('module'),
179-
];
154+
decoration('comment'),
155+
decoration('string'),
156+
decoration('keyword'),
157+
decoration('keyword.control'),
158+
decoration('keyword.unsafe'),
159+
decoration('function'),
160+
decoration('parameter'),
161+
decoration('constant'),
162+
decoration('type.builtin'),
163+
decoration('type.generic'),
164+
decoration('type.lifetime'),
165+
decoration('type.param'),
166+
decoration('type.self'),
167+
decoration('type'),
168+
decoration('text'),
169+
decoration('attribute'),
170+
decoration('literal'),
171+
decoration('literal.numeric'),
172+
decoration('literal.char'),
173+
decoration('literal.byte'),
174+
decoration('macro'),
175+
decoration('variable'),
176+
decoration('variable.mut', 'underline'),
177+
decoration('field'),
178+
decoration('module'),
179+
];
180180

181181
return new Map<string, vscode.TextEditorDecorationType>(decorations);
182182
}

editors/code/src/status_display.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ export class StatusDisplay implements vscode.Disposable {
2828
if (this.packageName) {
2929
this.statusBarItem!.text = `cargo ${this.command} [${
3030
this.packageName
31-
}] ${this.frame()}`;
31+
}] ${this.frame()}`;
3232
} else {
3333
this.statusBarItem!.text = `cargo ${
3434
this.command
35-
} ${this.frame()}`;
35+
} ${this.frame()}`;
3636
}
3737
}, 300);
3838

editors/code/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"noUnusedLocals": true,
1313
"noUnusedParameters": true,
1414
"noImplicitReturns": true,
15-
"noFallthroughCasesInSwitch": true
15+
"noFallthroughCasesInSwitch": true,
16+
"newLine": "LF"
1617
},
1718
"exclude": [
1819
"node_modules"

0 commit comments

Comments
 (0)