Skip to content

Instantly share code, notes, and snippets.

@comigor
Last active June 19, 2019 22:17
Show Gist options
  • Save comigor/ae86d89666b89b8a44de39b71e262290 to your computer and use it in GitHub Desktop.
Save comigor/ae86d89666b89b8a44de39b71e262290 to your computer and use it in GitHub Desktop.

VSCode Clojure Configuration

git clone git@gist.github.com:ae86d89666b89b8a44de39b71e262290.git vscode-clj

You'll need the following extensions:

// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "shift+cmd+k",
"command": "paredit.slurpSexpForward",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+right",
"command": "-paredit.slurpSexpForward",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "shift+cmd+a",
"command": "workbench.action.showCommands"
},
{
"key": "shift+cmd+p",
"command": "-workbench.action.showCommands"
},
{
"key": "alt+cmd+l",
"command": "calva-fmt.alignCurrentForm",
"when": "calva:activated && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "ctrl+alt+l",
"command": "-calva-fmt.alignCurrentForm",
"when": "calva:activated && editorTextFocus && !editorReadOnly && !hasOtherSuggestions && !suggestWidgetVisible && editorLangId == 'clojure'"
},
{
"key": "shift+cmd+p",
"command": "calva.evalCurrentTopLevelFormInREPLWindow",
"when": "calva:activated"
},
{
"key": "ctrl+alt+c ctrl+alt+space",
"command": "-calva.evalCurrentTopLevelFormInREPLWindow",
"when": "calva:activated"
},
{
"key": "alt+up",
"command": "paredit.rangeForDefun",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+alt+w space",
"command": "-paredit.rangeForDefun",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+right",
"command": "paredit.forwardSexp",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+right",
"command": "-paredit.forwardSexp",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+left",
"command": "paredit.backwardSexp",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+left",
"command": "-paredit.backwardSexp",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+up",
"command": "paredit.sexpRangeExpansion",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+w",
"command": "-paredit.sexpRangeExpansion",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "shift+alt+up",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+up",
"command": "-editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+down",
"command": "-editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+up",
"command": "-editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+down",
"command": "-editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+g",
"command": "editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "cmd+d",
"command": "-editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "ctrl+g",
"command": "-workbench.action.gotoLine"
},
{
"key": "shift+cmd+m",
"command": "-workbench.actions.view.problems"
},
{
"key": "shift+cmd+m",
"command": "calva.refreshAll"
},
{
"key": "shift+cmd+l",
"command": "-editor.action.selectHighlights",
"when": "editorFocus"
},
{
"key": "shift+cmd+l",
"command": "multiCommand.evalFileInREPL"
},
{
"key": "shift+cmd+j",
"command": "paredit.barfSexpForward",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+left",
"command": "-paredit.barfSexpForward",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+down",
"command": "paredit.sexpRangeContraction",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "ctrl+shift+w",
"command": "-paredit.sexpRangeContraction",
"when": "calva:activated && calva:pareditValid && paredit:keyMap =~ /original|strict/"
},
{
"key": "alt+down",
"command": "-history.showNext",
"when": "historyNavigationEnabled && historyNavigationWidget"
}
]
{
"workbench.startupEditor": "newUntitledFile",
"editor.formatOnSave": true,
"window.zoomLevel": 0,
"calva.fmt.allgnMapItems": true,
"calva.fmt.newIndentEngine": true,
"calva.fmt.removeConsecutiveBlankLines": true,
"multiCommand.commands": [
{
"command": "multiCommand.evalFileInREPL",
"sequence": [
"editor.action.selectAll",
"calva.evalCurrentFormInREPLWindow",
"cursorRight"
]
},
{
"command": "multiCommand.raise",
"sequence": [
"paredit.forwardSexp",
"paredit.sexpRangeExpansion",
"editor.action.clipboardCopyAction",
"paredit.sexpRangeExpansion",
"paredit.sexpRangeExpansion",
"editor.action.clipboardPasteAction"
]
}
],
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"constant.keyword.clojure"
],
"settings": {
"foreground": "#9cdcfeff"
}
},
{
"scope": [
"punctuation.section.expression.begin.clojure",
"punctuation.section.expression.end.trailing.clojure"
],
"settings": {
"foreground": "#999"
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment