Skip to content

Commit

Permalink
add vscode role
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshihisa Mochihara committed Feb 22, 2017
1 parent def8484 commit cf759e7
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions desktop.yml
Expand Up @@ -12,6 +12,7 @@
- { role: ghq, tags: [ ghq ] }
- { role: git, tags: [ git ] }
- { role: peco, tags: [ peco ] }
- { role: vscode, tags: [ vscode ] }
- { role: xremap, tags: [ xremap ] }

vars_prompt:
Expand Down
6 changes: 6 additions & 0 deletions roles/vscode/files/keybindings.json
@@ -0,0 +1,6 @@
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+l", "command": "workbench.action.showCommands" },
{ "key": "ctrl+x k", "command": "workbench.action.closeActiveEditor" },
{ "key": "ctrl+x ctrl+c", "command": "workbench.action.quit" },
]
6 changes: 6 additions & 0 deletions roles/vscode/files/settings.json
@@ -0,0 +1,6 @@
// Place your settings in this file to overwrite the default settings
{
"workbench.welcome.enabled": false,
"files.autoSave": "onFocusChange",
"editor.renderIndentGuides": true,
}
23 changes: 23 additions & 0 deletions roles/vscode/tasks/main.yml
@@ -0,0 +1,23 @@
- name: create a working directory
file: path=~/temp/ state=directory mode=0755

- name: register a working directory full path
command: find ~/temp -maxdepth 0
register: workdir_result

- name: download visual-studio-code
get_url: url=https://vscode-update.azurewebsites.net/1.9.1/linux-deb-x64/stable dest={{ workdir_result.stdout }}/vscode.deb

- name: dpkg vscode.deb
apt: deb={{ workdir_result.stdout }}/vscode.deb
become: yes

- name: install packages
command: code --install-extension "{{ item }}"
with_items: "{{packages}}"

- name: copy keybind file
copy: src=keybindings.json dest="{{ dot_vscode }}"

- name: copy setting file
copy: src=settings.json dest="{{ dot_vscode }}"
7 changes: 7 additions & 0 deletions roles/vscode/vars/main.yml
@@ -0,0 +1,7 @@
dot_vscode: ~/.config/Code/User

packages:
- donjayamanne.python
- lukehoban.Go
- hiro-sun.vscode-emacs
- PeterJausovec.vscode-docker

0 comments on commit cf759e7

Please sign in to comment.