diff --git a/lua/nvim-haven/init.lua b/lua/nvim-haven/init.lua index 1c51afc..4880c35 100644 --- a/lua/nvim-haven/init.lua +++ b/lua/nvim-haven/init.lua @@ -17,45 +17,46 @@ local M = {} local active_saves = {} local changed_lookup = {} -local directory_sep = g.iff(gos.is_windows, "\\", "/") local haven_config = { enabled = true, exclusions = { function(path, _) if gos.is_windows then - return path:lower():starts_with((vim.fn.eval("$VIMRUNTIME") .. directory_sep):lower()) + return path:lower():starts_with((vim.fn.eval("$VIMRUNTIME") .. gpath.directory_sep):lower()) end - return path:starts_with(vim.fn.eval("$VIMRUNTIME") .. directory_sep) + return path:starts_with(vim.fn.eval("$VIMRUNTIME") .. gpath.directory_sep) end, function(path, _) if gos.is_windows then - return path:lower():starts_with((vim.fn.stdpath("data") .. directory_sep):lower()) + return path:lower():starts_with((vim.fn.stdpath("data") .. gpath.directory_sep):lower()) end - return path:starts_with(vim.fn.stdpath("data") .. directory_sep) + return path:starts_with(vim.fn.stdpath("data") .. gpath.directory_sep) end, function(path, _) if gos.is_windows then return path:lower():starts_with( - (gpath.create_path(vim.fn.eval("$XDG_CONFIG_HOME"), "coc") .. directory_sep):lower() + (gpath.create_path(vim.fn.eval("$XDG_CONFIG_HOME"), "coc") .. gpath.directory_sep):lower() ) end return path:starts_with( - gpath.create_path(vim.fn.eval("$XDG_CONFIG_HOME"), "coc") .. directory_sep + gpath.create_path(vim.fn.eval("$XDG_CONFIG_HOME"), "coc") .. gpath.directory_sep ) end, function(path, _) if gos.is_windows then return path:lower():ends_with( - (directory_sep .. ".git" .. directory_sep .. "COMMIT_EDITMSG"):lower() + (gpath.directory_sep .. ".git" .. gpath.directory_sep .. "COMMIT_EDITMSG"):lower() ) end - return path:ends_with(directory_sep .. ".git" .. directory_sep .. "COMMIT_EDITMSG") + return path:ends_with( + gpath.directory_sep .. ".git" .. gpath.directory_sep .. "COMMIT_EDITMSG" + ) end, function(path, config) if gos.is_windows then - return path:lower():starts_with((config.haven_path .. directory_sep):lower()) + return path:lower():starts_with((config.haven_path .. gpath.directory_sep):lower()) end - return path:starts_with(config.haven_path .. directory_sep) + return path:starts_with(config.haven_path .. gpath.directory_sep) end }, haven_path = gpath.create_path(vim.fn.stdpath("data"), "nvim-haven"),