Skip to content

Commit

Permalink
[draft] trying to make colors work in Neovim
Browse files Browse the repository at this point in the history
  • Loading branch information
kurko committed Jul 4, 2023
1 parent 7b701d0 commit 2979362
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions plugin/smartest.vim
Original file line number Diff line number Diff line change
Expand Up @@ -416,16 +416,40 @@ function! RunTests(filename)
" exec ":!" . final_test_command
"

" Using silent keyword will avoid the `Hit ENTER to continue`
exec "!" . final_test_command
" Experimenting with fixing Neovim terminal colors by using :term instead of
" :!
"
" if has("nvim") " nvim
" " Neovim has a bug in which :! doesn't output terminal colors
" exec "term " . final_test_command
" else
" Using silent keyword will avoid the `Hit ENTER to continue`
exec "!" . final_test_command
" endif

redraw!
else
echo "Don't know how to run tests. Define .smartest." . smartest_test_context
endif
else
silent exec ":!echo " . smartest_test_description
silent exec ":!echo " . smartest_test_command
exec ":!" . smartest_test_command

" Experimenting with fixing Neovim terminal colors by using :term instead of
" :!
"
" if has("nvim") " nvim
" " Neovim has a bug in which :! doesn't output terminal colors
" " exec ":split | term " . smartest_test_command

" let term_position = get(g:, 'test#neovim#term_position', 'botright')
" execute term_position . ' new'
" call termopen(smartest_test_command)
" au BufDelete <buffer> wincmd p " switch back to last window
" startinsert
" else
exec ":!" . smartest_test_command
" endif
endif

endfunction
Expand Down

0 comments on commit 2979362

Please sign in to comment.