As title. Say I have a line to create an augroup located in file
git.lua. What I want to achieve is that that line will always create an augroup named
git.lua without hard-coding it by the string "git.lua", so I can renamed the file and no code needs to change. I did try calling nvim API like
vim.fn.bufname(and removing the prefix to get
git.lua, but this resulted in an augroup of name
plugins.lua, since this is where
git.lua got imported/
required. So what's the correct way to achieve this?
In short: I want to have a line of code to create an augroup, such that I can renamed that file and that line will always create an augroup as per the new name.