feat: neozoom settings adjusted
- fullscreen - no border - allow terminal - opacity on unfocus
This commit is contained in:
parent
ed314ae6c2
commit
77aaeef71c
@ -11,18 +11,18 @@ return {
|
|||||||
-- exclude_filetypes = {},
|
-- exclude_filetypes = {},
|
||||||
-- exclude_buftypes = {},
|
-- exclude_buftypes = {},
|
||||||
-- },
|
-- },
|
||||||
exclude_buftypes = { "terminal" },
|
-- exclude_buftypes = { "terminal" },
|
||||||
-- exclude_filetypes = { 'lspinfo', 'mason', 'lazy', 'fzf', 'qf' },
|
-- exclude_filetypes = { 'lspinfo', 'mason', 'lazy', 'fzf', 'qf' },
|
||||||
winopts = {
|
winopts = {
|
||||||
offset = {
|
offset = {
|
||||||
-- NOTE: omit `top`/`left` to center the floating window vertically/horizontally.
|
-- NOTE: omit `top`/`left` to center the floating window vertically/horizontally.
|
||||||
-- top = 0,
|
-- top = 0,
|
||||||
-- left = 0.17,
|
-- left = 0.17,
|
||||||
width = 150,
|
width = 1.0,
|
||||||
height = 0.85,
|
height = 1.0,
|
||||||
},
|
},
|
||||||
-- NOTE: check :help nvim_open_win() for possible border values.
|
-- NOTE: check :help nvim_open_win() for possible border values.
|
||||||
border = "thicc", -- this is a preset, try it :)
|
border = "none", -- this is a preset, try it :)
|
||||||
},
|
},
|
||||||
presets = {
|
presets = {
|
||||||
{
|
{
|
||||||
@ -41,9 +41,32 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
callbacks = {
|
||||||
|
function()
|
||||||
|
if vim.wo.winhl == "" then
|
||||||
|
vim.wo.winhl = "Normal:"
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
vim.keymap.set("n", "<CR>", function()
|
vim.keymap.set("n", "<leader>F", function()
|
||||||
vim.cmd("NeoZoomToggle")
|
vim.cmd("NeoZoomToggle")
|
||||||
end, { silent = true, nowait = true })
|
end, { silent = true, nowait = true })
|
||||||
|
vim.api.nvim_create_autocmd({ "WinEnter" }, {
|
||||||
|
group = curfile_augroup,
|
||||||
|
callback = function()
|
||||||
|
local did_zoom = require("neo-zoom").did_zoom()
|
||||||
|
if not did_zoom[1] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- wait for upstream: https://github.com/neovim/neovim/issues/23542.
|
||||||
|
if vim.api.nvim_get_current_win() == did_zoom[2] then
|
||||||
|
vim.api.nvim_win_set_option(did_zoom[2], "winbl", 0)
|
||||||
|
else
|
||||||
|
vim.api.nvim_win_set_option(did_zoom[2], "winbl", 25)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user