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

Automatically require clojure.repl namespace in Calva REPL for doc, find-doc, etc. #433

Closed
chamaeleon opened this issue Oct 26, 2019 · 2 comments

Comments

@chamaeleon
Copy link

It would be very nice if the Calva REPL automatically (perhaps user-defined behavior in settings) required clojure.repl on startup/jack-in so that doc, find-doc, etc. are available without any user interaction. I miss this from lein repl and other environments.

I was pointed in the direction of the command "Calva: Require Repl Utilities ..." which is bound to ctrl-alt-c + ctrl-u which does make it more convenient, but personally I'd really like it if the functions were "just there" without user interaction.

@bpringe
Copy link
Member

bpringe commented Nov 5, 2019

@PEZ I was starting to work on this, but I'd like to get your thoughts. Here are mine:

I think what @chamaeleon says above makes sense. It would probably be best to include the repl utilities at startup. Assuming you agree, then which of the following paths do we take?

  1. Require repl utilities at connection of the repl only. This mimics lein repl, where the utilities are available in the user namespace, but if you switch to another namespace you have to require them yourself.
  2. Require repl utilities at connection AND any time the namespace is changed, so that they're available everywhere. And if we do this option, do we just remove the Require Repl Utilities command?

I think I am in favor of option 1 and leaving the Require Repl Utilities command in the extension. This way it at least mimics lein repl, but also gives a convenient way to pull in the utilities elsewhere as we can now.

@PEZ
Copy link
Collaborator

PEZ commented Dec 19, 2023

  • Require repl utilities at connection of the repl only. This mimics lein repl, where the utilities are available in the user namespace, but if you switch to another namespace you have to require them yourself.

This is what lein does. And Calva too, since some months back.

  • Require repl utilities at connection AND any time the namespace is changed, so that they're available everywhere. And if we do this option, do we just remove the Require Repl Utilities command?

This risks generating conflicts in namespaces defining names used by the repl utilities.

The Require REPL Utilities command is broken, I think. I'll have a look at it now.

@PEZ PEZ mentioned this issue Dec 19, 2023
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants