- Open Visual Studio Code and access the Command Palette (⇧⌘P) and start typing "shell command" and select option "Shell Command: Install ‘code’ command in PATH".
- After that you’re able to start a new terminal window, change into your project directory and use code . to open the current directory in Visual Studio Code.
{
//--------------------------//
// VS Code Interface Tweaks //
//--------------------------//
// Disable breadcrumbs
"breadcrumbs.enabled": false,
// Make the cursor solid at all times (disables blinking)
"editor.cursorBlinking": "solid",
// Disable the minimap
"editor.minimap.enabled": false,
// Show rulers at 80 and 100 character
"editor.rulers": [80, 100],
// Always show the folding controls
"editor.showFoldingControls": "always",
// Hide the Editor, Search, Extensions, etc. bar.
// You can still get to them via hot-keys or the "View" menu
"workbench.activityBar.visible": false,
// My preferred theme
"workbench.colorTheme": "One Dark Pro",
// Hide the close button on tabs to condense them a bit
"workbench.editor.tabCloseButton": "off",
// Condense the tabs at the top just a bit
"workbench.editor.tabSizing": "shrink",
// Material theme icons
"workbench.iconTheme": "material-icon-theme",
// Enables horizontal scrolling in the sidebar
"workbench.list.horizontalScrolling": true,
// Add the path to the file in the window title
"window.title": "${activeEditorMedium}${separator}${rootName}",
// Starts up new windows with a new untitled file
"workbench.startupEditor": "newUntitledFile",
// Focus on files in the sidebar when selected in the main editor window
// But don't move the sidebar scroll position to them
"explorer.autoReveal": "focusNoScroll",
// Don't confirm when deleting files in the explorer
"explorer.confirmDelete": false,
// Don't confirm when dragging and dropping files in the explorer
"explorer.confirmDragAndDrop": false,
// Colorize bracket pairs
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
//----------------------//
// Code Writing Helpers //
//----------------------//
// Enable auto-closing of tags in all file types
"auto-close-tag.activationOnLanguage": ["*"],
// Set tabs to equal two spaces
"editor.tabSize": 4,
// Tell emmet to work on .js files (not just when specified as react)
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
//-----------------------------//
// Code Linting and Formatting //
//-----------------------------//
// Style linting //
// Disable VS Code's validation of css, less, and scss because we're using Stylelint
// (This just prevents duplicate reports in the log)
"css.validate": false,
"less.validate": false,
"scss.validate": false,
// Turn on Auto Fix for all providers (including eslint)
"editor.codeActionsOnSave": {
"source.fixAll": true
},
// Use prettier to format code
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// Format json with the json formatter
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
// General linting/formatting
// Format on Paste
"editor.formatOnPaste": true,
// Format on Save
"editor.formatOnSave": true,
// Format on Type
"editor.formatOnType": true,
// Insert a final newline
"files.insertFinalNewline": true,
// Remove additional newlines after the "final" one
"files.trimFinalNewlines": true,
// Trim any whitespace at the end of lines
"files.trimTrailingWhitespace": true,
//------------------//
// User Preferences //
//------------------//
// Use iTerm when opening current project in terminal (Cmd + Shift + C)
"terminal.external.osxExec": "iTerm.app",
// Stop suggesting to search parsers for unknown extensions
"extensions.ignoreRecommendations": true,
// Stop asking if I trust files
"security.workspace.trust.untrustedFiles": "open",
// Preferred Terminal
"terminal.integrated.defaultProfile.osx": "fish",
// Preferred font and ligatures
"editor.fontFamily": "Fira Code",
// What do these mean? See: https://github.com/tonsky/FiraCode/issues/1203
"editor.fontLigatures": "'ss01', 'ss02', 'ss04', 'ss06', 'ss07', 'ss09', 'zero', 'cv14', 'cv22', 'cv24', 'cv25', 'cv26', 'cv28', 'cv30'",
"better-comments.tags": [
{
"tag": "! ",
"color": "#FF2D00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "? ",
"color": "#61dcef",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "* ",
"color": "#98C379",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "> ",
"color": "#fff381",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "TODO ",
"color": "#cb00e6",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
// for documentation
"tag": ": ",
"color": "#cbdadf",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
}
],
"todo-tree.highlights.customHighlight": {
"LINK": {
"background": "#334bff",
"foreground": "#fff"
}
},
"todo-tree.regex.regex": "(//|\\*|<!--)\\s+($TAGS)\\s+",
"todo-tree.general.tags": [
"BUG",
"HACK",
"FIXME",
"TODO",
"LINK",
"?",
"*",
">",
"!"
],
"todo-tree.filtering.excludedWorkspaces": ["docs_site/*, node_modules/*"],
"todo-tree.highlights.defaultHighlight": {
"foreground": "#fff",
"background": "#cb00e6"
},
// Custom dictionary
"cSpell.userWords": [
// This will build up as you add words.
],
"window.zoomLevel": 1
}