Nix based firenvim
This commit is contained in:
parent
9bbe637131
commit
e5aa15485c
3 changed files with 83 additions and 8 deletions
dotfiles/neovim/lua/my
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue