1
Fork 0

Nix based firenvim

This commit is contained in:
Matei Adriel 2023-03-16 22:22:06 +01:00
parent 9bbe637131
commit e5aa15485c
No known key found for this signature in database
3 changed files with 83 additions and 8 deletions
dotfiles/neovim/lua/my
helpers
plugins

View file

@ -28,7 +28,7 @@ return {
return vim.g.neovide ~= nil or require("nix.env") == "neovide"
end),
firenvim = makeEnv(function()
return vim.g.started_by_firenvim ~= nil
return vim.g.started_by_firenvim ~= nil or require("nix.env") == "firenvim"
end),
_and = function(a, b)
return makeEnv(function()

View file

@ -4,9 +4,14 @@ local K = require("my.keymaps")
local M = {
"glacambre/firenvim", -- vim inside chrome
lazy = false,
cond = env.firenvim.active(),
-- cond = env.firenvim.active(),
cond = true
}
function M.blacklist(url)
vim.g.firenvim_config.localSettings[url] = { takeover = "never" }
end
function M.config()
vim.g.firenvim_config = {
localSettings = {
@ -33,6 +38,16 @@ function M.config()
-- {{{ Disable status line
vim.opt.laststatus = 0
-- }}}
-- {{{ Blacklist websites
local blacklisted = {
"https?://web.whatsapp\\.com/.*",
"https?://twitter\\.com/",
}
for _, url in ipairs(blacklisted) do
M.blacklist(url)
end
-- }}}
end
return M