moonfire-nvr/.vscode/settings.json
Scott Lamb b2fa415823 VS Code: specify workspace typescript version
Currently the workspace's version is older than VS Code's default.
VS Code complains about things that aren't errors according to the
workspace. (In particular, typing of catched exceptions has become
stricter.) With this setting, you can select the workspace's Typescript
version in the VS Code UI so the two are consistent.
2022-03-03 10:56:14 -08:00

53 lines
1.6 KiB
JSON

{
// General settings (notably including Javascript/Typescript).
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.rulers": [
{
"column": 80,
"color": "#cc8888"
}
],
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modifications",
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.insertSpaces": true,
"[markdown]": {
"editor.tabSize": 4,
// I find Prettier's markdown style jarring, including converting `*`
// bullets to `-` and two-column indents. It's not customizable either.
// Don't use it.
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
},
// Rust-specific overrides.
"[rust]": {
"editor.tabSize": 4,
"editor.rulers": [
80,
{
"column": 100,
"color": "#cc8888"
}
],
// It seems like rust-analyzer is supposed to be able to format
// Rust files, but with "matklad.rust-analyzer" here, VS Code says
// "There is no formatter for 'rust' files installed."
"editor.defaultFormatter": "matklad.rust-analyzer"
//"editor.defaultFormatter": null
},
"rust-analyzer.inlayHints.enable": false,
"markdown.extension.list.indentationSize": "inherit",
"markdown.extension.toc.unorderedList.marker": "*",
// Specify the path to the workspace version of TypeScript. Note this only
// takes effect when workspace version is selected in the UI.
// https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-the-workspace-version-of-typescript
"typescript.tsdk": "./ui/node_modules/typescript/lib"
}