Skip to content

Commit

Permalink
fix(autocmds): auto create directory on windows for uris. Fixes #2442
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Mar 26, 2024
1 parent 1910cd5 commit 7d570fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/lazyvim/config/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ 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
if event.match:match("^%w%w+:[\\/][\\/]") then
return
end
local file = vim.uv.fs_realpath(event.match) or event.match
Expand Down

0 comments on commit 7d570fa

Please sign in to comment.