Skip to content

Commit

Permalink
Init default settings/extensions for VSCode
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Dec 6, 2023
1 parent 5469dc1 commit 65b003c
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .vscode/extensions.json
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"
]
}
83 changes: 83 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
//////////////////////////////////////
// JS (ESLint)
//////////////////////////////////////
// https://eslint.style/guide/faq#how-to-auto-format-on-save
// https://github.com/microsoft/vscode-eslint#settings-options
"editor.formatOnSave": true,
"eslint.format.enable": true,
"[javascript]": {
"editor.formatOnSave": false, // to avoid formatting twice (ESLint + VSCode)
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
// this disables VSCode built-int 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"
},
"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/": false,
"pdfcomprezzor/": true,
"coverage/": true,
},
"files.associations": {
"*.js.erb": "javascript"
},
//////////////////////////////////////
// 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"
]
}

0 comments on commit 65b003c

Please sign in to comment.