mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 02:55:09 +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
|
end
|
||||||
|
|
||||||
-- misc
|
-- 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
|
-- autoformat
|
||||||
-- autocmd BufWritePre *.rs lua vim.lsp.buf.formatting_sync(nil, 1000)
|
-- autocmd BufWritePre *.rs lua vim.lsp.buf.formatting_sync(nil, 1000)
|
||||||
|
|
Loading…
Reference in a new issue