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

scrolldown on new output in clover repl panel? #30

Open
BorisVSchmid opened this issue May 29, 2021 · 2 comments
Open

scrolldown on new output in clover repl panel? #30

BorisVSchmid opened this issue May 29, 2021 · 2 comments

Comments

@BorisVSchmid
Copy link

Is there some way to make the clover repl panel scroll down in vscode, either when new output arrives at the clover repl, or on a keybinding?

@mauricioszabo
Copy link
Owner

Not with the code we have today. There's some difference on how Atom and VSCode register UIs on the editor, and this feature was already working but VSCode changed something on their UI and now it's not working anymore. I accept PRs or ideas on how to make it work :)

This is the Chlorine code that does the auto-scroll: https://github.com/mauricioszabo/atom-chlorine/blob/master/src/chlorine/ui/console.cljs#L33-L36

And this is the code on Clover that used to work in the past: https://github.com/mauricioszabo/clover/blob/master/src/clover/view/console.cljs#L12-L15

(I'm linking these in case someone wants to debug this issue :) )

@BorisVSchmid
Copy link
Author

The workaround that I use now is to install the multi-command extension, and add the below multicommand to keybindings.json. It just clears the clover console before evaluating the selection, which puts the output of the latest evaluation in clear view.

Commented out is what I tried earlier, but what I couldn't get to work. I had the Clover window as SecondEditorGroup, and then switch to the SecondEditorGroup, move the cursor to the bottom, and switch back to the first editor group. Works fine with having a regular window as SecondEditorGroup, but clover's window is apparently more special :-).

// Place your key bindings in this file to override the defaultsauto[]
[
    {
        "key": "ctrl+enter",
        "command": "extension.multiCommand.execute",
            "args": { 
                "sequence": [
                    "clover.clear-console",
                    "clover.evaluate-selection"
                    //"workbench.action.focusSecondEditorGroup",
                    //"cursorBottom"
                    //"workbench.action.focusFirstEditorGroup",
                    //"workbench.action.focusActiveEditorGroup"
                ]
            }
    }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants