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 26, 2019
1 parent c8dfabe commit eb576e1
Show file tree
Hide file tree
Showing 13 changed files with 623 additions and 2 deletions.
2 changes: 1 addition & 1 deletion snowblocks/taskwarrior/scripts/open-note.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ open_notes() {
declare -a local task_uuids
local task_uuid
local note_path="~/.task/notes"
local editor_cmd="atom -a"
local editor_cmd="code --add"
local note_file_ext="md"

for task_id in $@; do
Expand Down
2 changes: 1 addition & 1 deletion snowblocks/taskwarrior/taskopenrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
#+------+
NOTES_FOLDER="~/.task/notes/"
NOTES_EXT=".md"
NOTES_CMD="atom --add ~/.task/notes/$UUID.md"
NOTES_CMD="code --add ~/.task/notes/$UUID.md"

PATH_EXT=/usr/share/taskopen/scripts
1 change: 1 addition & 0 deletions snowblocks/taskwarrior/taskrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ context.igloo=project:igloo
context.job=+job
context.lumio=project:lumio
context.nord=project:nord
context.nord-docs=project:nord-docs
context.northem=project:northem
context.private=+private
context.snowsaw=project:snowsaw
Expand Down
29 changes: 29 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,29 @@
/*
* 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="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;
}
191 changes: 191 additions & 0 deletions snowblocks/visual-studio-code/keybindings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
/*
* 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"
},
{
"key": "cmd+shift+d",
"command": "editor.action.copyLinesDownAction"
},

/* Move lines up and down */
{
"key": "ctrl+up",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+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"
},
{
"key": "cmd+ctrl+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},

/* Add multiple cursors. */
{
"key": "ctrl+shift+up",
"command": "editor.action.insertCursorAbove",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+down",
"command": "editor.action.insertCursorBelow",
"when": "editorTextFocus && !editorReadonly"
},

/* Toggle block commments for current selection */
{
"key": "ctrl+shift+numpad_divide",
"command": "editor.action.blockComment",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+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"
},
{
"key": "cmd+shift+[Period]",
"command": "workbench.action.toggleActivityBarVisibility"
},

/* Show "quick open" command palette */
{
"key": "ctrl+t",
"command": "workbench.action.quickOpen"
},
{
"key": "cmd+t",
"command": "workbench.action.quickOpen"
},
{
"key": "ctrl+t",
"command": "-workbench.action.showAllSymbols"
},
{
"key": "cmd+t",
"command": "-workbench.action.showAllSymbols"
},
{
"key": "ctrl+p",
"command": "-workbench.action.quickOpen"
},
{
"key": "cmd+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 keybindings 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"
},
{
"key": "cmd+w",
"command": "-workbench.action.closeWindow",
"when": "!editorIsOpen && !multipleEditorGroups"
},

/* Disable line duplication shortcut in order to use custom keybinding. */
{
"key": "shift+alt+down",
"command": "-editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
}
]
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"
}
]
}
104 changes: 104 additions & 0 deletions snowblocks/visual-studio-code/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*
* 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.autoReveal": false,
"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": "hidden",
"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.autocompleteUnimportedPackages": true,
"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.printWidth": 120,
"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
}
}
Loading

0 comments on commit eb576e1

Please sign in to comment.