Instead of passing this in, use vim.eval('expand("%:p")') ? It ain't pretty, but it works :).