Skip to content

Commit

Permalink
Visual Studio Code
Browse files Browse the repository at this point in the history
This commit includes the migration from Atom (1) to
Visual Studio Code (2).
I've used Atom since it came out some years ago and it has always been a
great editor and IDE for web development as well as main editor for
documents, but VS Code evolved a lot during the last year.

Compared to Atom there are many features and improvements that I've
really liked to see for Atom. Even though it can be extended and
modified a lot there are limitations due to Atom's core in aspects like
performance, stability and overall development features like auto
completion and language-awareness.

VS Code feels more "language-native" when it comes to e.g. intelligent
auto-completion, the integration of linters and language specific tools.
It comes with support for a lot of languages out-of-the-box like
JavaScript/TypeScript, CSS/HTML and also native languages like Go or
Rust.

The change was not easy for me since I've customized and developed Atom
to fit all of development needs, but after some testing time I've to
admit that the UX of VS Code feels better now.

Before actually switching I made sure that all my beloved Atom packages
are also available as VS Code extension (same code base) or an
equivalent alternative.

Therefore this initial setup includes

- core and extension settings
- custom keybindings
- locale configurations
- a list of all installed extensions
- CSS stylesheets to customize some that'll be loaded by the "Custom
  CSS and JS Loader" (3) extension
- workspace files

The following extensions are used:

- Nord (4)
- file-icons (5)
- Prettier (6)
- ESLint (7)
- Markdown Preview Enhanced (8)
- Babel JavaScript (9)
- vscode-styled-components (10)
- Path Intellisense (11)
- Go (12)
- Docker (13)
- YAML (14)
- EditorConfig (15)
- Projects+ (16)
- Polacode (17)
- Custom CSS and JS Loader (18)
- Rust (rls) (19)
- GraphQL (20)

References:
  (1) https://atom.io
  (2) https://code.visualstudio.com
  (3) https://marketplace.visualstudio.com/items?itemName=be5invis.vscode-custom-css
  (4) https://marketplace.visualstudio.com/items?itemName=arcticicestudio.nord-visual-studio-code
  (5) https://marketplace.visualstudio.com/items?itemName=file-icons.file-icons
  (6) https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
  (7) https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
  (8) https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced
  (9) https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel
  (10) https://marketplace.visualstudio.com/items?itemName=jpoissonnier.vscode-styled-components
  (11) https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense
  (12) https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go
  (13) https://marketplace.visualstudio.com/items?itemName=PeterJausovec.vscode-docker
  (14) https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml
  (15) https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
  (16) https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-projects-plus
  (17) https://marketplace.visualstudio.com/items?itemName=pnp.polacode
  (18) https://marketplace.visualstudio.com/items?itemName=be5invis.vscode-custom-css
  (19) https://marketplace.visualstudio.com/items?itemName=rust-lang.rust
  (20) https://marketplace.visualstudio.com/items?itemName=Prisma.vscode-graphql

Resolves GH-179
  • Loading branch information
arcticicestudio committed Feb 23, 2019
1 parent c8dfabe commit 8cebb08
Show file tree
Hide file tree
Showing 9 changed files with 549 additions and 0 deletions.
32 changes: 32 additions & 0 deletions snowblocks/visual-studio-code/css/remove-action-button.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (C) 2016-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2016-present Sven Greb <[email protected]>
*
* Project: Nord Atom UI
* Repository: https://github.com/arcticicestudio/nord-atom-ui
* License: MIT
*/

/*
* Removes unnecessary "action button" clutter.
* The functionality is available through keybindings and the command palette.
*/

/* Hide action buttons placed next to sidebar view titles */
[aria-label="Debug actions"] {
display: none !important;
}
[aria-label="Editor actions"] {
display: none !important;
}
[aria-label="Search actions"] {
display: none !important;
}
[aria-label="Extensions actions"] {
display: none !important;
}

/* Hide action buttons placed in sidebar panel headers */
.panel-header.expanded .actions {
display: none !important;
}
132 changes: 132 additions & 0 deletions snowblocks/visual-studio-code/keybindings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
/*
* Copyright (C) 2016-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2016-present Sven Greb <[email protected]>
*
* Project: igloo
* Repository: https://github.com/arcticicestudio/igloo
* License: MIT
*/
[
/* +--- Editor Workflow ---+ */
/* Duplicate lines */
{
"key": "ctrl+shift+d",
"command": "editor.action.copyLinesDownAction"
},

/* Move lines up and down */
{
"key": "ctrl+up",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+up",
"command": "-editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+down",
"command": "-editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},

/* Toggle block commments for current selection */
{
"key": "ctrl+shift+numpad_divide",
"command": "editor.action.blockComment",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+a",
"command": "-editor.action.blockComment",
"when": "editorTextFocus && !editorReadonly"
},

/* +--- Extensions ---+ */
/* [Markdown Preview Enhanced] */
/* Open markdown preview tab */
{
"key": "ctrl+shift+m",
"command": "markdown-preview-enhanced.openPreview",
"when": "editorLangId == 'markdown'"
},

/* [Projects+] */
/* Open command palette to open project */
{
"key": "ctrl+shift+alt+p",
"command": "projects.open"
},
{
"key": "ctrl+alt+p",
"command": "-projects.open"
},
/* Open command palette to add project folder to current workspace */
{
"key": "ctrl+alt+p",
"command": "projects.addToWorkspace"
},

/* +--- UI ---+ */
/* Toggle activity bar visibility */
{
"key": "ctrl+shift+[Period]",
"command": "workbench.action.toggleActivityBarVisibility"
},

/* Show "quick open" command palette */
{
"key": "ctrl+t",
"command": "workbench.action.quickOpen"
},
{
"key": "ctrl+t",
"command": "-workbench.action.showAllSymbols"
},
{
"key": "ctrl+p",
"command": "-workbench.action.quickOpen"
},

/* Show symbols command palette for current file */
{
"key": "ctrl+q",
"command": "workbench.action.gotoSymbol"
},
{
"key": "ctrl+shift+o",
"command": "-workbench.action.gotoSymbol"
},
/* Show symbols command palette for the complete workspace */
{
"key": "ctrl+shift+q",
"command": "workbench.action.showAllSymbols"
},

/* +--- Defaults ---+ */
/* Disable all default shortcuts to close the application window! */
{
"key": "ctrl+q",
"command": "-workbench.action.quit"
},
{
"key": "ctrl+shift+w",
"command": "-workbench.action.closeWindow"
},
{
"key": "ctrl+p",
"command": "-workbench.action.quickOpenNavigateNextInFilePicker",
"when": "inFilesPicker && inQuickOpen"
},
{
"key": "ctrl+w",
"command": "-workbench.action.closeWindow",
"when": "!editorIsOpen && !multipleEditorGroups"
}
]
15 changes: 15 additions & 0 deletions snowblocks/visual-studio-code/locale.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (C) 2016-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2016-present Sven Greb <[email protected]>
*
* Project: igloo
* Repository: https://github.com/arcticicestudio/igloo
* License: MIT
*/
{
/*
* Defines the display language.
* See https://code.visualstudio.com/docs/getstarted/locales for details.
*/
"locale":"en"
}
18 changes: 18 additions & 0 deletions snowblocks/visual-studio-code/projects.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"groups": [
{
"name": "",
"projects": []
}
],
"projects": [
{
"name": "playlists",
"path": "~/videos/playlists"
},
{
"name": "scratchpad",
"path": "~/documents/scratchpad"
}
]
}
108 changes: 108 additions & 0 deletions snowblocks/visual-studio-code/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
* Copyright (C) 2016-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2016-present Sven Greb <[email protected]>
*
* Project: igloo
* Repository: https://github.com/arcticicestudio/igloo
* License: MIT
*/
{
/*+--- Core ---+*/
"editor.accessibilitySupport": "off",
"editor.codeLens": true,
"editor.colorDecorators": true,
"editor.cursorBlinking": "phase",
"editor.emptySelectionClipboard": false,
"editor.fontFamily": "'Source Code Pro', 'Hack'",
"editor.fontSize": 20,
"editor.fontWeight": "500",
"editor.formatOnSave": true,
"editor.lightbulb.enabled": false,
"editor.multiCursorModifier": "ctrlCmd",
"editor.renderIndentGuides": false,
"editor.smoothScrolling": true,
"editor.tabSize": 2,
"editor.wordWrapColumn": 120,
"explorer.openEditors.visible": 0,
"extensions.autoUpdate": false,
"extensions.closeExtensionDetailsOnViewChange": true,
"extensions.ignoreRecommendations": true,
"extensions.showRecommendationsOnlyOnDemand": true,
"files.associations": {},
"files.eol": "\n",
"files.insertFinalNewline": true,
"problems.autoReveal": false,
"search.collapseResults": "alwaysCollapse",
"search.useGlobalIgnoreFiles": true,
"telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false,
"terminal.explorerKind": "external",
"terminal.external.linuxExec": "tilix",
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.fontSize": 20,
"update.channel": "none",
"update.enableWindowsBackgroundUpdates": false,
"window.enableMenuBarMnemonics": false,
"window.menuBarVisibility": "toggle",
"window.titleBarStyle": "native",
"window.zoomLevel": 0.5,
"workbench.activityBar.visible": false,
"workbench.colorTheme": "Nord",
"workbench.commandPalette.preserveInput": true,
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen": false,
"workbench.editor.focusRecentEditorAfterClose": false,
"workbench.enableExperiments": false,
"workbench.iconTheme": "file-icons",
"workbench.quickOpen.preserveInput": true,
"workbench.settings.enableNaturalLanguageSearch": false,
"workbench.sideBar.location": "left",
"workbench.startupEditor": "newUntitledFile",
"workbench.statusBar.feedback.visible": false,

/*+--- Extensions ---+*/
"docker.showExplorer": false,
"go.coverageDecorator": {
"type": "highlight",
"coveredHighlightColor": "rgba(163, 190, 140, 0.45)",
"uncoveredHighlightColor": "rgba(191, 97, 106, 0.25)",
"coveredGutterStyle": "verticalgreen",
"uncoveredGutterStyle": "verticalred"
},
"html.format.indentInnerHtml": true,
"javascript.preferences.quoteStyle": "double",
"markdown-preview-enhanced.enableExtendedTableSyntax": true,
"markdown.preview.breaks": true,
"markdown.preview.doubleClickToSwitchToEditor": false,
"markdown.preview.fontFamily": "-apple-system, BlinkMacSystemFont, Inter, sans-serif",
"markdown.preview.fontSize": 20,
"path-intellisense.showHiddenFiles": true,
"prettier.requireConfig": true,
"projects.checkPaths": true,
"projects.configPath": "~/.vscode/projects.json",
"projects.indentationSpaces": 2,
"projects.refreshDepth": 4,
"projects.refreshRoots": [
"~/code/incubator",
"~/code/job",
"~/code/lab",
"~/code/snippetbox",
"~/yggdrasil"
],
"projects.showDescriptions": false,
"projects.statusbarEnabled": false,
"rust-client.disableRustup": true,
"typescript.preferences.quoteStyle": "double",
"vscode_custom_css.imports": [
"file:///home/arcticicestudio/.vscode/css/remove-action-button.css",
"file:///Users/sgreb/.vscode/css/remove-action-button.css"
],
"vscode_custom_css.statusbar": false,
"yaml.format.enable": true,

/*+--- Language Scopes ---+*/
"[go]": {
"editor.insertSpaces": true
}
}
79 changes: 79 additions & 0 deletions snowblocks/visual-studio-code/snowblock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[
{
"clean": [
"~/Library/Application Support/Code/User",
"~/.config/Code/User",
"~/.vscode"
]
},
{
"link": {
"~/.vscode/css": {
"create": true,
"force": true,
"hosts": {
"iceowl": "css",
"igloo": "css"
}
},
"~/.vscode/workspaces": {
"create": true,
"force": true,
"hosts": {
"iceowl": "workspaces",
"igloo": "workspaces"
}
},
"~/.config/Code/User/keybindings.json": {
"create": true,
"force": true,
"hosts": {
"igloo": "keybindings.json"
}
},
"~/Library/Application Support/Code/User/keybindings.json": {
"create": true,
"force": true,
"hosts": {
"iceowl": "keybindings.json"
}
},
"~/.config/Code/User/locale.json": {
"create": true,
"force": true,
"hosts": {
"igloo": "locale.json"
}
},
"~/Library/Application Support/Code/User/locale.json": {
"create": true,
"force": true,
"hosts": {
"iceowl": "locale.json"
}
},
"~/.vscode/projects.json": {
"create": true,
"force": true,
"hosts": {
"iceowl": "projects.json",
"igloo": "projects.json"
}
},
"~/.config/Code/User/settings.json": {
"create": true,
"force": true,
"hosts": {
"igloo": "settings.json"
}
},
"~/Library/Application Support/Code/User/settings.json": {
"create": true,
"force": true,
"hosts": {
"iceowl": "settings.json"
}
}
}
}
]
Loading

0 comments on commit 8cebb08

Please sign in to comment.