parsonsmatt / intero-neovim

A neovim plugin for Intero, forked from ghcmod-vim
218 stars 28 forks source link

Kill previous command before sending a command #130

Closed parsonsmatt closed 6 years ago

parsonsmatt commented 6 years ago

This PR sends a C-c to the REPL before sending a command. This clears the current command, which will prevent any unfinished input from clobbering the text.

Fixes #66

owickstrom commented 6 years ago

If you run an intentionally long-running process in the REPL, like a web server, it would be killed? Doesn't affect me much as I'd preferably run Yesod's DevelMain, and thus not block the REPL, but still worth asking. 😃

Also worth noting is that before this PR, :reload and other commands are sent to the running process on stdin, which isn't very useful. So overall, this is good IMHO!

parsonsmatt commented 6 years ago

Yeah, it would -- that's a good thing to notice! If they've got a long running server in their Intero REPL, well, that's a weird workflow, and I'm not sure how much I'd want to support it. That would break literally every other feature of the plugin.

owickstrom commented 6 years ago

@parsonsmatt Yeah, you're right. So maybe the right thing to do is to clearly state that in the documentation, that this plugin is not meant to be running such programs.

parsonsmatt commented 6 years ago

This change ends up making the plugin extremely flaky to use.