Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the use of ”Fiddle” files #2199

Closed
PEZ opened this issue May 18, 2023 · 0 comments
Closed

Support the use of ”Fiddle” files #2199

PEZ opened this issue May 18, 2023 · 0 comments
Labels

Comments

@PEZ
Copy link
Collaborator

PEZ commented May 18, 2023

In this episode of the Clojure Design Podcast https://clojuredesign.club/episode/014-fiddle-with-the-repl/ they talk about using separate files to put code experiments and such in. It's a bit like Rich Comment Forms in a separate file. They call them fiddle files. It's not too different from how the REPL Window works, except that there is no need for a prompt, because a fiddle file typically only serves one namespace. (At least that's one way to do it.)

The fiddle files are supposed to go in some dev source path, so that they do not get part of the packaged and shipped application. Calva could make it easy to switch back and forth between the fiddle file for a namespace and the implementation of that namespace. A bit like we do with test files. (Or maybe it is clojure-lsp doing it these days.) This would take a bit of configuration from the user, I think. So that we know which folder to treat as the ”mirror”. I think we might need to know things about the classpath as well. Maybe clojure-lsp can give us that.

Fiddle files could also be placed side-by-side with the implementation namespace they server. I sometimes do this, and name the files with .calva-repl as their extension, which gets treated a bit like .cljc files, because that's how the REPL Window is treated. We could support some more file extension to be treated like this. Like .fiddle, and .rich. Switching to and from these files is easier to implement.

@PEZ PEZ added the repl label May 18, 2023
@PEZ PEZ mentioned this issue Jul 3, 2023
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant