-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Init default settings/extensions for VSCode (#569)
* Init default settings/extensions for VSCode * Add further settings * Improve "format on save" options Also do not use deprecated flags in new VSCode version. * Remove trailing comma in settings.json * Enable ESLint as formatter
- Loading branch information
Showing
2 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"shopify.ruby-lsp", | ||
"dbaeumer.vscode-eslint", | ||
"streetsidesoftware.code-spell-checker", | ||
"streetsidesoftware.code-spell-checker-german" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
////////////////////////////////////// | ||
// JS (ESLint) | ||
////////////////////////////////////// | ||
// https://eslint.style/guide/faq#how-to-auto-format-on-save | ||
// https://github.com/microsoft/vscode-eslint#settings-options | ||
"[javascript]": { | ||
"editor.formatOnSave": false, // to avoid formatting twice (ESLint + VSCode) | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"eslint.format.enable": true, // use ESLint as formatter | ||
// this disables VSCode built-in formatter (instead we want to use ESLint) | ||
"javascript.validate.enable": false, | ||
////////////////////////////////////// | ||
// HTML | ||
////////////////////////////////////// | ||
"[html]": { | ||
"editor.formatOnSave": false // TODO: activate once HTML formatter installed | ||
}, | ||
////////////////////////////////////// | ||
// Ruby (Rubocop) | ||
////////////////////////////////////// | ||
"[ruby]": { | ||
"editor.defaultFormatter": "Shopify.ruby-lsp", | ||
"editor.formatOnSave": true | ||
}, | ||
"rubyLsp.formatter": "rubocop", | ||
"rubyLsp.rubyVersionManager": "rbenv", | ||
"rubyLsp.enabledFeatures": { | ||
"codeActions": true, | ||
"diagnostics": true, | ||
"documentHighlights": true, | ||
"documentLink": true, | ||
"documentSymbols": true, | ||
"foldingRanges": true, | ||
"formatting": true, | ||
"hover": true, | ||
"inlayHint": true, | ||
"onTypeFormatting": true, | ||
"selectionRanges": true, | ||
"semanticHighlighting": true, | ||
"completion": true, | ||
"codeLens": true, | ||
"definition": true | ||
}, | ||
"rubyLsp.enableExperimentalFeatures": true, | ||
////////////////////////////////////// | ||
// Files | ||
////////////////////////////////////// | ||
"files.exclude": { | ||
"node_modules/": true, | ||
"pdfcomprezzor/": true, | ||
"coverage/": true, | ||
"solr/": true | ||
}, | ||
"files.associations": { | ||
"*.js.erb": "javascript", | ||
"*.html.erb": "html" | ||
}, | ||
////////////////////////////////////// | ||
// Editor | ||
////////////////////////////////////// | ||
"editor.wordWrap": "wordWrapColumn", | ||
"editor.wordWrapColumn": 100, // toggle via Alt + Z shortcut | ||
"editor.mouseWheelZoom": true, | ||
"editor.rulers": [ | ||
{ | ||
"column": 80, // soft limit | ||
"color": "#e5e5e5" | ||
}, | ||
{ | ||
"column": 100, // hard limit | ||
"color": "#c9c9c9" | ||
} | ||
], | ||
////////////////////////////////////// | ||
// Spell Checker | ||
////////////////////////////////////// | ||
"cSpell.words": [ | ||
"turbolinks" | ||
] | ||
} |