remove mkdir plugin and replace with autocmd

This commit is contained in:
2023-06-26 11:14:21 -04:00
parent 2faab2882e
commit 993c50bb34
2 changed files with 9 additions and 1 deletions

View File

@ -46,3 +46,12 @@ auto('TermClose', {
o.cmdheight = 1
end
})
auto('BufWritePre', { -- make dirs when they don't exist
pattern = '*',
group = vim.api.nvim_create_augroup('auto_create_dir', { clear = true }),
callback = function(ctx)
local dir = vim.fn.fnamemodify(ctx.file, ':p:h')
vim.fn.mkdir(dir, 'p')
end
})

View File

@ -38,7 +38,6 @@ require 'dep' {
{ 'mbbill/undotree' }, -- careful this one is written in vimscript
{ 'windwp/nvim-autopairs' },
{ 'numToStr/Comment.nvim' },
{ 'jghauser/mkdir.nvim' }, -- mkdir's when they dont exist
{ 'numtostr/BufOnly.nvim' }, -- kill the other buffers with :BufOnly
{ 'ahmedkhalf/project.nvim' }, -- cd into root of project
{ 'akinsho/toggleterm.nvim' },