mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
add file exists function
This commit is contained in:
parent
222425157e
commit
2890ce665e
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue