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 Mar 4, 2019
1 parent c8dfabe commit 1065339
Show file tree
Hide file tree
Showing 20 changed files with 822 additions and 4 deletions.
2 changes: 0 additions & 2 deletions snowblocks/plank/launchers/igloo/atom.dockitem

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[PlankDockItemPreferences]
Launcher=file:///usr/share/applications/firefox-developer-edition.desktop
2 changes: 2 additions & 0 deletions snowblocks/plank/launchers/igloo/visual-studio-code.dockitem
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[PlankDockItemPreferences]
Launcher=file:///usr/share/applications/visual-studio-code.desktop
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 <development@arcticicestudio.com>
* Copyright (C) 2016-present Sven Greb <development@svengreb.de>
*
* 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;
}
207 changes: 207 additions & 0 deletions snowblocks/visual-studio-code/keybindings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
/*
* Copyright (C) 2016-present Arctic Ice Studio <development@arcticicestudio.com>
* Copyright (C) 2016-present Sven Greb <development@svengreb.de>
*
* 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": "ctrl+cmd+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": "ctrl+cmd+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"
},
/* Show available code actions */
{
"key": "shift+space",
"command": "editor.action.codeAction"
},
/* Show available parameter hints */
{
"key": "ctrl+shift+space",
"command": "editor.action.triggerParameterHints",
"when": "editorHasSignatureHelpProvider && editorTextFocus"
},
{
"key": "ctrl+shift+space",
"command": "-editor.action.triggerParameterHints",
"when": "editorHasSignatureHelpProvider && editorTextFocus"
},

/* +--- 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 <development@arcticicestudio.com>
* Copyright (C) 2016-present Sven Greb <development@svengreb.de>
*
* 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"
}
]
}
Loading

0 comments on commit 1065339

Please sign in to comment.