I would like to format my code using /bin/black everytime I save a python file in neovim. So I have the following in my ~/.config/nvim/init.lua
a.nvim_create_autocmd( { "BufWritePre" }, {
pattern = { "*.py" },
command = [[ /bin/black ]],
})
but I get the error like:
E492: Not an editor command: /bin/black
Could someone let me know how can I run black (an external command) in BufWritePre set.
Cheers, DD.
sorry for the question and I got it.
it command should be
where
!for external command and%for current file.