fix: wildcard pattern usage in `fs_realpath` (#2152)

This commit is contained in:
M 2023-07-02 17:52:52 +07:00 committed by GitHub
parent 10b668d98a
commit 83aac1ecc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -72,11 +72,10 @@ autocmd("FileType", {
})
-- reload some chadrc options on-save
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = vim.tbl_map(
vim.fs.normalize,
vim.fn.glob(vim.loop.fs_realpath(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua"), true, true, true)
),
autocmd("BufWritePost", {
pattern = vim.tbl_map(function(path)
return vim.fs.normalize(vim.loop.fs_realpath(path))
end, vim.fn.glob(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua", true, true, true)),
group = vim.api.nvim_create_augroup("ReloadNvChad", {}),
callback = function(opts)