add file exists function

This commit is contained in:
Chris 2021-03-19 13:19:58 -04:00
parent 222425157e
commit 2890ce665e

View file

@ -195,6 +195,10 @@ function nv_utils.blame_line()
end
-- misc
function nv_utils.file_exists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
-- autoformat
-- autocmd BufWritePre *.rs lua vim.lsp.buf.formatting_sync(nil, 1000)