Skip to content

Calva When Clause Contexts

When clause contexts is a powerful customization mechanism in VS Code. The most common use for end users is with keyboard shortcut bindings. Extensions can provide their own. The following contexts are available with Calva:

  • calva:keybindingsEnabled: a master switch that you find in the settings
  • paredit:keyMap: strict, original, or none from the corresponding Calva setting (see Paredit)
  • calva:connected: true when Calva is connected to a REPL (there is also calva:connecting || calva:launching)
  • calva:outputWindowActive: true when the Output/REPL window has input focus
  • calva:replHistoryCommandsActive: true when the cursor is in the Output/REPL window at the top level after the last prompt
  • calva:outputWindowSubmitOnEnter: true when the cursor is adjacent after the last top level form in the Output/REPL window
  • calva:cursorInString: true when the cursor/caret is in a string or a regexp
  • calva:cursorInComment: true when the cursor is in, or adjacent to a line comment
  • calva:cursorBeforeComment: true when the cursor is adjacent before a line comment
  • calva:cursorAfterComment: true when the cursor is adjacent after a line comment
  • calva:cursorAtStartOfLine: true when the cursor is at the start of a line including any leading whitespace
  • calva:cursorAtEndOfLine: true when the cursor is at the end of a line including any trailing whitespace