vim-slime icon indicating copy to clipboard operation
vim-slime copied to clipboard

neovim target TermOpen autocmd interactions with other terminal buffers

Open jmbuhr opened this issue 3 months ago • 3 comments

Would you be open to making the creation of this autocommand optional? As it also triggers on other terminal buffers that are not intended as a repl, like e.g. the terminal buffers created by neotest (https://github.com/nvim-neotest/neotest) to run tests or the terminal to run the preview command for quarto-nvim (https://github.com/quarto-dev/quarto-nvim/).

https://github.com/jpalardy/vim-slime/blob/51aaece8f7858358ca365466dec96c53b479e77a/plugin/slime.vim#L43-L49

In the case of neotest, this then leads to

Error detected while processing TermOpen Autocommands for "*"..function slime#targets#neovim#SlimeAddChannel:
line    3:
E900: Invalid channel id

the first time a test is run.

slime#targets#neovim#SlimeAddChannel(expand('<abuf>')) could then be called manually on the creation of terminal intended for receiving code.

jmbuhr avatar Mar 18 '24 12:03 jmbuhr