Here is a simple addition to the doom theme that allows items in the center to be conditionally shown. My main use case for this is for sessions and git. For example,
center = {
-- items removed
{
action = "Neogit",
desc = " git",
icon = " ",
key = "G",
cond = require("cmill.core.util").is_git_repo() -- only show if cwd is git repo
}, {
action = "SessionManager load_current_dir_session",
desc = " restore session",
icon = " ",
key = "s",
cond = require("session_manager").current_dir_session_exists() -- only show if session for cwd exists
},
-- items removed
}
Here is a simple addition to the doom theme that allows items in the center to be conditionally shown. My main use case for this is for sessions and git. For example,