kassio/neoterm

Feature request: integrate close when tests succeed with `vim-test`

alok opened this issue · 8 comments

alok commented

I'm not sure which plugin to report this to, but when vim-test uses neoterm to run tests, neoterm does not close after tests succeed even if the following options are set:

let g:neoterm_run_tests_bg = 1
let g:neoterm_raise_when_tests_fail = 1
let g:neoterm_run_tests_bg = 1
let g:neoterm_close_when_tests_succeed = 1

tbh I didn't know vim-test. It seems pretty cool. I'll try to improve this integration. Also, I'm considering in removing the test feature from the neoterm, since it seems to be replicated with vim-test. wdyt? /cc @janko-m

alok commented

Haha, that's funny since vim-test has some integration with neoterm.

I'd like it if neoterm generalized to essentially being a "window manager" for terminals and letting other plugins actually control what goes in them. Neoterm could control things like opening/closing terminals, resizing them to fit the input/output, etc.

janko commented

@kassio @alok I agree, I think it would be a good if Neoterm was only a terminal manager, and leaves generating test commands to a separate plugin that is specialized only for that (vim-test). Because generating test commands is really a separate responsibility, since these commands can also be run using other "terminal managers", e.g. dispatch.vim.

@alok, @janko-m: cool. I'll deprecate the test feature from neoterm for a month, then I'll remove it suggesting to use vim-test.

@alok with that, these configurations will die together with neoterm's test feature, I can help add those features (run in bg, autoclose neoterm, etc) on vim-test later.

@kassio please don't remove the test status on status bar .. It's very useful in my workflow .. implement it on vim-test instead would be great though,

janko commented

@drselump14 I think this is a generic feature for any shell command, it just indicates whether the shell command is currently running, succeeded, or errored, so I imagine this feature will stay.

@drselump14 and @janko-m, actually, nowadays, it's not checking if the shell command succeeds or not, today it's parsing the shell command output. I really tried to use the command output status when I created this feature, but I wasn't able at the time to make it work. 😢

We can add this to vim-test later, but I think this would be better if it worked with any vim-test's strategies.