1
Fork 0

A lot of neovim config updates

This commit is contained in:
Matei Adriel 2022-10-09 03:28:51 +02:00
parent d3ab72c6c8
commit 98e8510ae7
21 changed files with 874 additions and 152 deletions
dotfiles/neovim/lua/my/helpers

View file

@ -0,0 +1,22 @@
local function makeEnv(cond)
return {
active = cond,
unless = function(f)
if not cond() then f()
end
end,
when = function(f)
if cond() then f()
end
end
}
end
return {
vscode = makeEnv(function()
return vim.g.vscode ~= nil
end),
firevim = makeEnv(function()
return vim.g.started_by_firenvim ~= nil
end)
}

View file

@ -1,15 +0,0 @@
local M = {}
function M.when(f)
if vim.g.vscode ~= nil then
f()
end
end
function M.unless(f)
if vim.g.vscode == nil then
f()
end
end
return M