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

Interrupt support for Scheme client #497

Closed
AbheetChaudhary opened this issue May 23, 2023 · 4 comments
Closed

Interrupt support for Scheme client #497

AbheetChaudhary opened this issue May 23, 2023 · 4 comments
Labels
client-scheme enhancement New feature or request

Comments

@AbheetChaudhary
Copy link

Scheme's REPL does not have interrupt support like some others. For scheme <localleader>ei does not sends interrupt signal. It behaves as usual ei key press in vim, i.e, goto end then insert. So if we enter in an infinite loop or some situation like that, then there will be choice but to stop the repl completely with <localleader>cS.

Also, the help docs on running :help conjure dont tell about the keybindings <localleader>ei and <localleader>cS. I got them from discord.

@AbheetChaudhary
Copy link
Author

Out of curiosity I tried to use conjure from your fork russtoku/conjure. I used lazy and set branch="dev2" and commit="4dd024c", Then i put scheme in an infinite loop but the binding <localleader>ei didn't sent any interrupt signal instead it was still at its old behaviour. Also there was no ConjureInterruptScheme command like there is for ConjureInterruptPython. Did I missed some step? Was it supposed to work at this stage?

Could it be because of this thing mentioned in the Contributing to Conjure:
"Your changes and evaluations only apply to the in memory copy of Conjure, use make compile to persist the changes as files in the lua directory. I commit these alongside my Fennel changes so each commit lines up with the Fennel and corresponding Lua changes."

Because when I tried to fix it I took some 15-20 lines of code from the python client's implementation of interrupt and when i ran make compile I just gave up by looking at the amount of diffs it made. I may have done something wrong ... kinda new to OSS. Your commit Fix for issue Olical#497 Scheme client did not had too many diffs, just two files and less about 20 lines.

It could have been because of that or I am being too hasty.

@russtoku
Copy link
Contributor

Sorry! That was my fault. I didn't commit the Lua files from running "make compile". I've done that and pushed a commit on my dev2 branch.

I think it would be better if you just specify the branch for the lazy.nvim config. This is what I used for testing with a ~/.config/nvim/init.lua file for Neovim:

require('lazy').setup({
  'navarasu/onedark.nvim',
  'nvim-lualine/lualine.nvim',
  'nvim-treesitter/nvim-treesitter',
  { 'russtoku/conjure', branch = "dev2" }}, {})

@AbheetChaudhary
Copy link
Author

Great!
I just tried it and its working. Thanks for the fix. Hoping to see the PR getting merged.

@Olical Olical added enhancement New feature or request client-scheme labels May 28, 2023
@Olical
Copy link
Owner

Olical commented May 28, 2023

This is implemented on the develop branch, please let me know what you think and I'll get this in a release soon. Just need some other users to smoke test it first really.

@Olical Olical closed this as completed Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-scheme enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants