Configure vscode.
This commit is contained in:
parent
4d620a33b7
commit
6b3bdab18b
1
ansible/roles/vscode/files/code-flags.conf
Normal file
1
ansible/roles/vscode/files/code-flags.conf
Normal file
@ -0,0 +1 @@
|
||||
--ozone-platform-hint=auto
|
192
ansible/roles/vscode/files/keybindings.json
Normal file
192
ansible/roles/vscode/files/keybindings.json
Normal file
@ -0,0 +1,192 @@
|
||||
// Place your key bindings in this file to override the defaultsauto[]
|
||||
[
|
||||
{
|
||||
"key": "alt+.",
|
||||
"command": "editor.action.revealDefinition",
|
||||
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
|
||||
},
|
||||
{
|
||||
"key": "f12",
|
||||
"command": "-editor.action.revealDefinition",
|
||||
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
|
||||
},
|
||||
{
|
||||
"key": "alt+,",
|
||||
"command": "workbench.action.navigateBack",
|
||||
"when": "canNavigateBack"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+-",
|
||||
"command": "-workbench.action.navigateBack",
|
||||
"when": "canNavigateBack"
|
||||
},
|
||||
{
|
||||
"key": "shift+alt+/",
|
||||
"command": "editor.action.goToReferences",
|
||||
"when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
|
||||
},
|
||||
{
|
||||
"key": "shift+f12",
|
||||
"command": "-editor.action.goToReferences",
|
||||
"when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+.",
|
||||
"command": "workbench.action.showAllSymbols"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+t",
|
||||
"command": "-workbench.action.showAllSymbols"
|
||||
},
|
||||
{
|
||||
"key": "alt+;",
|
||||
"command": "editor.action.commentLine",
|
||||
"when": "editorTextFocus && !editorReadonly"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+/",
|
||||
"command": "-editor.action.commentLine",
|
||||
"when": "editorTextFocus && !editorReadonly"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+x",
|
||||
"command": "-editor.action.clipboardCutAction"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+x",
|
||||
"command": "-filesExplorer.cut",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+x 3",
|
||||
"command": "workbench.action.splitEditor"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+\\",
|
||||
"command": "-workbench.action.splitEditor"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+x 2",
|
||||
"command": "workbench.action.splitEditorDown"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+\\",
|
||||
"command": "-workbench.action.splitEditorDown"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+x 1",
|
||||
"command": "workbench.action.joinAllGroups"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+x 0",
|
||||
"command": "workbench.action.closeEditorsAndGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+x shift+=",
|
||||
"command": "workbench.action.evenEditorWidths"
|
||||
},
|
||||
{
|
||||
"key": "shift+up",
|
||||
"command": "workbench.action.focusAboveGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+up",
|
||||
"command": "-workbench.action.focusAboveGroup"
|
||||
},
|
||||
{
|
||||
"key": "shift+down",
|
||||
"command": "workbench.action.focusBelowGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+down",
|
||||
"command": "-workbench.action.focusBelowGroup"
|
||||
},
|
||||
{
|
||||
"key": "shift+left",
|
||||
"command": "workbench.action.focusLeftGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+left",
|
||||
"command": "-workbench.action.focusLeftGroup"
|
||||
},
|
||||
{
|
||||
"key": "shift+right",
|
||||
"command": "workbench.action.focusRightGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+right",
|
||||
"command": "-workbench.action.focusRightGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+x ctrl+s",
|
||||
"command": "workbench.action.files.save"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+s",
|
||||
"command": "-workbench.action.files.save"
|
||||
},
|
||||
{
|
||||
"key": "alt+g g",
|
||||
"command": "workbench.action.gotoLine"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+g",
|
||||
"command": "-workbench.action.gotoLine"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+space",
|
||||
"command": "editor.action.setSelectionAnchor",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+b",
|
||||
"command": "-editor.action.setSelectionAnchor",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+w",
|
||||
"command": "editor.action.clipboardCopyAction"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+c",
|
||||
"command": "-editor.action.clipboardCopyAction"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w",
|
||||
"command": "editor.action.clipboardCutAction"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+y",
|
||||
"command": "editor.action.clipboardPasteAction"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+v",
|
||||
"command": "-editor.action.clipboardPasteAction"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+x ctrl+f",
|
||||
"command": "workbench.action.quickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+e",
|
||||
"command": "-workbench.action.quickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a",
|
||||
"command": "cursorLineStart"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+e",
|
||||
"command": "cursorLineEnd"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+s",
|
||||
"command": "actions.find",
|
||||
"when": "editorFocus || editorIsOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+f",
|
||||
"command": "-actions.find",
|
||||
"when": "editorFocus || editorIsOpen"
|
||||
}
|
||||
]
|
17
ansible/roles/vscode/files/settings.json
Normal file
17
ansible/roles/vscode/files/settings.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"workbench.colorTheme": "Default High Contrast",
|
||||
"remote.SSH.connectTimeout": 30,
|
||||
"remote.SSH.enableDynamicForwarding": false,
|
||||
"remote.SSH.enableAgentForwarding": false,
|
||||
"remote.SSH.enableX11Forwarding": false,
|
||||
"python.analysis.inlayHints.functionReturnTypes": true,
|
||||
"python.analysis.inlayHints.variableTypes": true,
|
||||
"editor.minimap.enabled": false,
|
||||
"editor.fontSize": 12,
|
||||
"editor.cursorStyle": "block",
|
||||
"editor.fontFamily": "'Cascadia Mono', 'monospace', monospace",
|
||||
"workbench.colorCustomizations": {
|
||||
"editorCursor.foreground": "#ccff66",
|
||||
"terminalCursor.foreground": "#ccff66"
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
- name: Copy files
|
||||
copy:
|
||||
src: "files/{{ item.src }}"
|
||||
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
|
||||
mode: 0600
|
||||
owner: "{{ account_name.stdout }}"
|
||||
group: "{{ group_name.stdout }}"
|
||||
loop:
|
||||
# Support wayland
|
||||
- src: code-flags.conf
|
||||
dest: .config/code-flags.conf
|
||||
|
||||
- name: Create directories
|
||||
when: closed_source_vscode
|
||||
file:
|
||||
name: "{{ account_homedir.stdout }}/{{ item }}"
|
||||
state: directory
|
||||
mode: 0700
|
||||
owner: "{{ account_name.stdout }}"
|
||||
group: "{{ group_name.stdout }}"
|
||||
loop:
|
||||
- .config/Code/User
|
||||
|
||||
- name: Copy files
|
||||
when: closed_source_vscode
|
||||
copy:
|
||||
src: "files/{{ item.src }}"
|
||||
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
|
||||
mode: 0600
|
||||
owner: "{{ account_name.stdout }}"
|
||||
group: "{{ group_name.stdout }}"
|
||||
loop:
|
||||
- src: keybindings.json
|
||||
dest: .config/Code/User/keybindings.json
|
||||
- src: settings.json
|
||||
dest: .config/Code/User/settings.json
|
||||
|
||||
- name: Create directories
|
||||
when: not closed_source_vscode
|
||||
file:
|
||||
name: "{{ account_homedir.stdout }}/{{ item }}"
|
||||
state: directory
|
||||
mode: 0700
|
||||
owner: "{{ account_name.stdout }}"
|
||||
group: "{{ group_name.stdout }}"
|
||||
loop:
|
||||
- .config/Code/User
|
||||
|
||||
- name: Copy files
|
||||
when: not closed_source_vscode
|
||||
copy:
|
||||
src: "files/{{ item.src }}"
|
||||
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
|
||||
mode: 0600
|
||||
owner: "{{ account_name.stdout }}"
|
||||
group: "{{ group_name.stdout }}"
|
||||
loop:
|
||||
- src: keybindings.json
|
||||
dest: .config/Code - OSS/User/keybindings.json
|
||||
- src: settings.json
|
||||
dest: .config/Code - OSS/User/settings.json
|
Loading…
x
Reference in New Issue
Block a user