1
Fork 0
This commit is contained in:
Matei Adriel 2022-12-05 01:18:31 +01:00
parent 32b53a7fd6
commit 811660e30a
11 changed files with 49 additions and 8 deletions
dotfiles/neovim/lua/my/helpers

View file

@ -2,12 +2,10 @@ local function makeEnv(cond)
return {
active = cond,
unless = function(f)
if not cond() then f()
end
if not cond() then f() end
end,
when = function(f)
if cond() then f()
end
if cond() then f() end
end
}
end
@ -16,6 +14,9 @@ return {
vscode = makeEnv(function()
return vim.g.vscode ~= nil
end),
neovide = makeEnv(function()
return vim.g.neovide ~= nil
end),
firevim = makeEnv(function()
return vim.g.started_by_firenvim ~= nil
end)