

The output window is mostly a regular Calva Clojure/ClojureScript file, which make everything that works in a regular file work in this file, including Paredit. See Calva issue #907 Peek Current NamespaceĪ somewhat hidden feature: You can see documentation for, peek and navigate to a namespace by hovering on the namespace symbol in one of the repl window prompts (just like you would if it was not in the prompt 😄). This currently suffers from a limitation in Calva where it won't reload dependencies, so you will sometimes have to do this ”manually” anyway (by opening the files and loading them). To help with this Calva's command Load Current File also works in the output window, but then acts like Load Current Namespace.Ĭonsider you have two files, pez/xxx.clj and pez/yyy.clj, where pez.yyy requires pez.xxx. When navigating namespaces it is easy to forget to first require them and that can be a bit tricky to fix. You can also hover over symbols in the stack trace to see the symbol's documentation, and ctrl+click ( cmd+click on Mac) the symbol to Peek Definition. The output window will also have a Codelense button below the error message that will print the stack trace.įor printed stacktraces, when source locations are available (Clojure files) you will be able to navigate to them by pressing ctrl+click ( cmd+click on Mac) on the file name. If there is a stack trace associated with the error, this can now be printed on demand using the Calva: Print Last Stacktrace to the Output Window command.

When an evaluation produces an error, the output window will automatically print the the error message. You can clear the repl history by running the command "Clear REPL History" from the command palette. If you modify some text in the history while traversing, the modification will be saved at that location in history. If you have typed some text after the prompt before you start traversing up the history, this text will be preserved and will display when you traverse back down the history. If the cursor is not at the end of the last form, then alt+up and alt+down will do what they are mapped to, which is by default "Move Line Up" and "Move Line Down," respectively. You can navigate up and down the last forms evaluated in the REPL file by using alt+up and alt+down, provided your cursor is at the end of the last form after the prompt.

Recently evaluated forms in the REPL file are persisted and can easily be shown again for modifying and re-evaluating. This, since the namespace ”followed” the first evaluation over to the output window. Then evaluate it using alt+enter, you'll get: When you are working from the Output/REPL window, and want to open the file that defines its current namespace, use the Show File for the Current Output/REPL Window Namespace command, ctrl+alt+c o. Find the File for the Current REPL Window Namespace To sync the Output/REPL window namespace with the current file before switching, use the Switch Namespace of the Output/REPL Window to Current Namespace command, ctrl+alt+c alt+n. If you quickly want to open and switch to the output window there is the command Calva: Show Output Window, ctrl+alt+c o. This gets important when the file/window is used as an interactive REPL. The first part of the prompt tells you which REPL type the window is currently connected to. The first prompt is from when the clj REPL is connected, the second when Calva has a cljs REPL connection. In ClojureScript projects the window will be associated with the cljs REPL once this one is connected. This file is created and opened when Calva is connected to a REPL. When Calva evaluates Clojure/ClojureScript code, the results are displayed inline as well as printed to the results output window/file.

#Is there an output window for visual studio mac? how to
How to Use Calva With the re-frame Template Something to Try First (After Connecting)įind the File for the Current REPL Window Namespace
