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

Jump to files are read-only #2550

Open
tggreene opened this issue May 7, 2024 · 2 comments
Open

Jump to files are read-only #2550

tggreene opened this issue May 7, 2024 · 2 comments

Comments

@tggreene
Copy link

tggreene commented May 7, 2024

When I jump to a function definition from a third party library the file is opened in read-only mode. For example when I jump to the ring.middleware.gzip/wrap-gzip function by holding alt and clicking on it it opens up the gzip.clj file correctly but as a read-only buffer.

Ideally I'd like to be able to edit these files to insert debugging statements but can't find any way of doing it, something I was used to doing in emacs.

It may well not be calva that's doing this, if so I'll close this issue.

@PEZ
Copy link
Collaborator

PEZ commented May 7, 2024

Hi! Thanks for bringing this up. We should document this, so please don't close the issue.

It is VS Code that doesn't suport editing files from readonly sources. What you can do is copy the forms you want to edit to the REPL Window and edit them from there. There are commands for conveniently sending a function definition or something else to the REPL Window.

image

The commands will also switch the current ns for the REPL Window to that of from where you sent the forms, so evaluating them will be as if editing the original “file“.

@tggreene
Copy link
Author

tggreene commented May 8, 2024

Brilliant, thanks Peter

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

2 participants