Skip to content

Instantly share code, notes, and snippets.

@pusewicz
Created September 1, 2022 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pusewicz/989f4abdd97a5feb0183bc0043e90b89 to your computer and use it in GitHub Desktop.
Save pusewicz/989f4abdd97a5feb0183bc0043e90b89 to your computer and use it in GitHub Desktop.
vim9script
g:test#strategy = "vimterminal"
nmap <silent> <leader>t :TestNearest<CR>
nmap <silent> <leader>T :TestFile<CR>
def HdtTransform(cmd: string): string
var cmd_string = cmd
if !empty(glob(".docker/tilt/Dockerfile"))
cmd_string = 'hdt exec ' .. cmd_string
endif
return cmd_string
enddef
g:test#custom_transformations = {'hdt': function('HdtTransform')}
g:test#transformation = 'hdt'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment