I was curious, is it possible to lock your scroll position in the repl window? Currently new output will always force you to the bottom, which isn’t so great when you’re trying to read something
I haven't come across this yet but I see what you mean. If you have continuous output and you want to scroll up and read something while output is being written, it will keep scrolling back down, right?
This probably needs to be handled... I think an issue would be good. I'm not sure the options we have, like if we can know when the user scrolls up... Or maybe if there's any scrolling up, or if the last part of the doc is not visible before writing output, then don't auto scroll after writing..
Yeah, it’s something I’ve been running into with test runner output and async output
I'm almost amazed it hasn't been brought up yet lol
I’m not sure what degree of control you have over this, hopefully there is a solution
hah yeah for me it’s been kinda a ‘oh this repl is nice, but damn gotta wait for output, note to self’
Please create an issue and we'll see about it when there's time. There are other priorities too currently, so if you want to take a stab and have time, that would be nice too.
i don't suppose having a split view where one tracks changes and the other stays fixed is any use here...(iiuc vscode already has split views of some sort)
in other words, I’ve just been enjoying the positives
I’d like to get back in there and tackle some of those dusty items, like monorepo support. Pretty hammered with a work project at the moment but hopefully that will let up and give me some free time soon
@sogaiu Interesting.. I think this might overcomplicate things though and crowd the limited screen space with something that's essentially duplicated. Unless you mean a native vs code feature..
I'm not familiar
If you mean like open two versions of the output window, I think the current functionality might scroll both anyway, but not sure
is the new repl window all /results-output
?
@brandon.ringe i was thinking of this feature in vscode: https://stackoverflow.com/a/40709472 ah, but that doesn't seem to quite do what i had in mind. as you say it seems crowded.
Oh I see
Oops, misunderstood and deleted my messages lol
Yes most of the code is there for the repl/output window
And then things reference this code where needed, but it's mostly encapsulated there
I left this feature out intentionally because I deemed it too hard to be implemented in a nice enough manner. But I could live with a toggle that the user is in full control of. No automatic figuring out whether it should scroll or not.
We’re having issues when using clojure.tools.namespace.repl and calva, might be our misunderstanding of things when we reload a namespace with clojure.tools.namespace.repl (using a file watcher in this case), the calva REPL with that namespace doesn’t seem to get refreshed to that reloaded namespace. Is there a way of doing that programatically?
also is this still true about separate repl sessions? https://github.com/BetterThanTomorrow/calva/issues/232#issuecomment-504152491 as we may also be running into this!
For reference the file watcher is roughly this:
https://github.com/duct-framework/core/blob/master/src/duct/core/repl.clj#L23-L37
could the fact that that’s calling reload
in a separate thread be anything to do with the weirdness?
The session is the same now, it's the same session used among both file and repl/output window. I've never used clojure.tools.namespace.repl with Calva, so I can't provide much info. Maybe @pez has some idea.
Can you provide a reproduction, @charliebriggs? What you expect should happen and what happens.