Added filechanged event
This commit is contained in:
@@ -8,6 +8,7 @@ local cmd = vim.api.nvim_create_user_command
|
||||
local nvimhelp = augroup("help_window_right", { clear = true })
|
||||
local mkdirrun = augroup("MkdirRun", { clear = true })
|
||||
local yank = augroup("kickstart-highlight-yank", { clear = true })
|
||||
local filechange = augroup("filechange", { clear = true })
|
||||
|
||||
cmd("SetTheme", function(arg)
|
||||
local themeselected = arg.fargs[1]
|
||||
@@ -53,3 +54,17 @@ autocmd("BufWritePre", {
|
||||
require("taken.utils.mkdir").run()
|
||||
end,
|
||||
})
|
||||
|
||||
autocmd("FileChangedShell", {
|
||||
group = filechange,
|
||||
pattern = { "*" },
|
||||
callback = function(args)
|
||||
--- @type string
|
||||
local file = args.file
|
||||
local cwd = vim.fn.getcwd()
|
||||
if file:find(cwd) then
|
||||
file = file:sub(#cwd + 2)
|
||||
end
|
||||
vim.notify(file .. " has been chnaged", vim.log.levels.WARN)
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user