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 settingsparedit:keyMap:strict,original, ornonefrom the corresponding Calva setting (see Paredit)calva:connected:truewhen Calva is connected to a REPL (there is alsocalva:connecting||calva:launching)calva:outputWindowActive:truewhen the Output/REPL window has input focuscalva:replHistoryCommandsActive:truewhen the cursor is in the Output/REPL window at the top level after the last promptcalva:replWindowSubmitOnEnter:truewhen the cursor is adjacent after the last top level form in the Output/REPL windowcalva:cursorInString:truewhen the cursor/caret is in a string or a regexpcalva:cursorInComment:truewhen the cursor is in, or adjacent to a line commentcalva:cursorBeforeComment:truewhen the cursor is adjacent before a line commentcalva:cursorAfterComment:truewhen the cursor is adjacent after a line commentcalva:cursorSeesCommentPrev:truewhen the the previous character, excluding whitespace, is a comment character.
It is true even if the cursor is inside a comment, but not if it is before the comment character.calva:cursorSeesCommentNext:truewhen the next character, excluding whitespace, is part of a comment.
It is true even if inside a comment, but not if at the newline that ends a comment.calva:cursorAtStartOfLine:truewhen the cursor is at the start of a line including any leading whitespacecalva:cursorAtEndOfLine:truewhen the cursor is at the end of a line including any trailing whitespacecalva:projectRoot: A string with the absolute path to the repl project root, without trailing slashcalva:ns: A string with the current namespacecalva:replSessionType:clj, orcljsdepending on the file type of the current file