fix(autocmds): don't auto create dirs for urls. Fixes #583
This commit is contained in:
@ -72,6 +72,9 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||
group = augroup("auto_create_dir"),
|
||||
callback = function(event)
|
||||
if event.match:match("^%w%w+://") then
|
||||
return
|
||||
end
|
||||
local file = vim.loop.fs_realpath(event.match) or event.match
|
||||
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
|
||||
end,
|
||||
|
Reference in New Issue
Block a user