diff options
author | Squibid <me@zacharyscheiman.com> | 2023-06-26 11:14:21 -0400 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2023-06-26 11:14:21 -0400 |
commit | 993c50bb342aba6f61aa1e3bac5034c3b8e42ed5 (patch) | |
tree | bbe5c96efec52f54f138cccf9a0ab54a8811504c | |
parent | 2faab2882e337847e24ed429b252572bffdece23 (diff) | |
download | nvim-993c50bb342aba6f61aa1e3bac5034c3b8e42ed5.tar.gz nvim-993c50bb342aba6f61aa1e3bac5034c3b8e42ed5.tar.bz2 nvim-993c50bb342aba6f61aa1e3bac5034c3b8e42ed5.zip |
remove mkdir plugin and replace with autocmd
Diffstat (limited to '')
-rw-r--r-- | lua/core/auto.lua | 9 | ||||
-rw-r--r-- | lua/core/plugins.lua | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lua/core/auto.lua b/lua/core/auto.lua index 1a20612..3e517ab 100644 --- a/lua/core/auto.lua +++ b/lua/core/auto.lua @@ -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 +}) diff --git a/lua/core/plugins.lua b/lua/core/plugins.lua index 9633591..4836c2e 100644 --- a/lua/core/plugins.lua +++ b/lua/core/plugins.lua @@ -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' }, |