Skip to content

Commit

Permalink
feat: improvements to VS Code config & new feats
Browse files Browse the repository at this point in the history
  • Loading branch information
primeare committed Sep 8, 2023
1 parent 7162271 commit b8e7588
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .config/fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ set -gx EDITOR code --wait --new-window
set -gx VISUAL code --wait --new-window

# manual Visual Studio Code shell integration
string match -q "$TERM_PROGRAM" "vscode" and . (code --locate-shell-integration-path fish)
string match -q "$TERM_PROGRAM" "vscode"
and . (code --locate-shell-integration-path fish)
2 changes: 1 addition & 1 deletion .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
defaultBranch = main
[push]
default = current
followTags = true
[fetch]
prune = true
[pull]
Expand All @@ -27,7 +28,6 @@
[credential]
helper = osxkeychain
[core]
# editor = nano -w
editor = code --wait
[color]
ui = auto
Expand Down
51 changes: 42 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"editor.suggest.localityBonus": true,
"editor.suggest.preview": true,
"editor.suggestSelection": "first",
"editor.snippetSuggestions": "inline",
"editor.snippetSuggestions": "top",
"editor.accessibilitySupport": "off",
"editor.unicodeHighlight.ambiguousCharacters": true,
"editor.unicodeHighlight.invisibleCharacters": true,
Expand All @@ -38,9 +38,12 @@
"editor.parameterHints.cycle": true,
"editor.linkedEditing": true,
"editor.stickyScroll.enabled": true,
"editor.stickyScroll.scrollWithEditor": true,
"editor.stickyScroll.maxLineCount": 5,
"editor.defaultColorDecorators": true,
"editor.formatOnSave": true,
"editor.experimental.asyncTokenization": true,
"editor.defaultFormatter": null,
"editor.formatOnSave": false,
"editor.formatOnPaste": true,
"editor.formatOnSaveMode": "modificationsIfAvailable",
"editor.codeActionsOnSave": {
Expand All @@ -67,22 +70,26 @@
"workbench.editor.defaultBinaryEditor": "hexEditor.hexedit",
"workbench.editor.historyBasedLanguageDetection": true,
"workbench.editor.tabCloseButton": "off",
"workbench.editor.splitInGroupLayout": "horizontal",
"workbench.tree.renderIndentGuides": "always",
"workbench.settings.enableNaturalLanguageSearch": false,
"workbench.commandPalette.preserveInput": true,
"workbench.list.smoothScrolling": true,
"workbench.settings.editor": "json",
"workbench.settings.useSplitJSON": true,
"workbench.editor.preventPinnedEditorClose": "keyboardAndMouse",

// Files
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.eol": "\n",
"files.defaultLanguage": "${activeEditorLanguage}",
"files.readonlyFromPermissions": true,

// Explorer
"explorer.confirmDelete": true,
"explorer.confirmDragAndDrop": true,
"explorer.decorations.badges": true,
"explorer.incrementalNaming": "smart",

Expand All @@ -103,13 +110,18 @@
"breadcrumbs.enabled": true,
"breadcrumbs.symbolPath": "off",

// Accessibility
"accessibility.dimUnfocused.enabled": true,
"accessibility.dimUnfocused.opacity": 0.75,

// Terminal
"terminal.explorerKind": "external",
"terminal.integrated.defaultProfile.osx": "fish",
"terminal.integrated.shellIntegration.enabled": false,
"terminal.integrated.shellIntegration.enabled": true,
"terminal.integrated.shellIntegration.decorationsEnabled": "both",
"terminal.integrated.fontFamily": "Fira Code, monospace",
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.cursorStyleInactive": "none",
"terminal.integrated.enablePersistentSessions": false,
"terminal.integrated.persistentSessionReviveProcess": "never",
"terminal.integrated.confirmOnExit": "hasChildProcesses",
Expand All @@ -120,6 +132,7 @@
"terminal.integrated.gpuAcceleration": "on",
"terminal.integrated.customGlyphs": true,
"terminal.integrated.enableBell": true,
"terminal.integrated.hideOnStartup": "whenEmpty",
"terminal.integrated.autoReplies": {
"Terminate batch job (Y/N)": "Y\r"
},
Expand Down Expand Up @@ -155,7 +168,13 @@
"problems.defaultViewMode": "table",

// Screencast Mode
"screencastMode.keyboardShortcutsFormat": "commandWithGroupAndKeys",
"screencastMode.fontSize": 56,
"screencastMode.keyboardOptions": {
"showKeys": true,
"showCommands": true,
"showCommandGroups": true,
"showSingleEditorCursorMoves": true
},

// Remote
"remote.tunnels.access.preventSleep": true,
Expand All @@ -165,12 +184,16 @@
"diffEditor.maxComputationTime": 0,
"diffEditor.ignoreTrimWhitespace": false,
"diffEditor.diffAlgorithm": "advanced",
"diffEditor.useInlineViewWhenSpaceIsLimited": false,
"diffEditor.experimental.useVersion2": true,
"diffEditor.experimental.showMoves": true,

// Merge Editor
"mergeEditor.diffAlgorithm": "advanced",
"mergeEditor.showDeletionMarkers": true,

// Git & SCM
"git.defaultBranchName": "main",
"git.enableStatusBarSync": false,
"git.mergeEditor": false,
"git.untrackedChanges": "separate",
Expand Down Expand Up @@ -208,6 +231,7 @@
"javascript.inlayHints.propertyDeclarationTypes.enabled": true,
"javascript.inlayHints.variableTypes.enabled": true,
"javascript.referencesCodeLens.enabled": true,
"javascript.preferences.renameMatchingJsxTags": true,
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
Expand All @@ -229,6 +253,7 @@
"typescript.inlayHints.variableTypes.enabled": true,
"typescript.referencesCodeLens.enabled": true,
"typescript.implementationsCodeLens.enabled": true,
"typescript.preferences.renameMatchingJsxTags": true,

// HTML & Handlebars
"html.format.unformatted": null,
Expand All @@ -246,18 +271,22 @@
"bem.elementSeparator": "__",
"bem.modifierSeparator": "--",
"output.inlineBreak": 1,
"css.autoInsertVendorPrefixes": true,
"css.autoInsertVendorPrefixes": true
},
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"typescript": "typescriptreact",
"handlebars": "html"
},

// CSS
"css.validate": true,
"css.format.enable": true,
"css.format.braceStyle": "collapse",
"css.format.newlineBetweenSelectors": true,
"css.format.newlineBetweenRules": true,
"css.format.spaceAroundSelectorSeparator": true,
"css.format.preserveNewLines": true,
"css.lint.boxModel": "ignore",
"css.lint.argumentsInColorFunction": "error",
"css.lint.vendorPrefix": "warning",
Expand All @@ -267,7 +296,7 @@
"css.lint.float": "error",
"css.lint.fontFaceProperties": "error",
"css.lint.hexColorLength": "error",
"css.lint.idSelector": "warning",
"css.lint.idSelector": "ignore",
"css.lint.ieHack": "warning",
"css.lint.important": "warning",
"css.lint.importStatement": "warning",
Expand All @@ -291,6 +320,7 @@
"markdown.occurrencesHighlight.enabled": true,
"markdown.validate.duplicateLinkDefinitions.enabled": "error",
"markdown.validate.unusedLinkDefinitions.enabled": "warning",
"markdown.editor.pasteUrlAsFormattedLink.enabled": "smart",

// Prisma specific configurations
"[prisma]": {
Expand All @@ -299,7 +329,6 @@

// JSON with comments specific configurations
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features",
"editor.formatOnSave": false,
"editor.formatOnPaste": false
},
Expand Down Expand Up @@ -377,7 +406,7 @@
// Path IntelliSense (Extension)
"path-intellisense.showHiddenFiles": true,

// Markdown All in One
// Markdown All in One (Extension)
"markdown.extension.preview.autoShowPreviewToSide": true,
"markdown.extension.orderedList.autoRenumber": true,
"markdown.extension.toc.levels": "2..6",
Expand All @@ -387,5 +416,9 @@
"README.md": [
"## Table of Contents"
]
}
},

// Figma (Extension)
"figma.autocompleteProperties": true,
"figma.autocompleteBlocks": true
}
2 changes: 2 additions & 0 deletions scripts/install-nodejs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ PKG_OUTPUT_PATH="./node-latest.pkg"
NPM_GLOBAL_PACKAGE_DIR_PATH="$HOME/.npm-packages/bin"
NODEJS_SHIMS_DIR_PATH="$HOME/.node-shims"

echo "Installing Node.js $LATEST_NODEJS_VERSION"

curl "$PKG_DOWNLOAD_URL" \
--output $PKG_OUTPUT_PATH \
--fail \
Expand Down

0 comments on commit b8e7588

Please sign in to comment.