Use true-zen.nvim for maximizing buffers

This commit is contained in:
Tyler Hallada 2023-12-01 15:26:00 -05:00
parent 734aebfa00
commit 23bbab50e9
3 changed files with 38 additions and 2 deletions

View File

@ -368,6 +368,12 @@ return require('packer').startup(function(use)
require('plugins.session-lens')
end
}
use {
'Pocco81/true-zen.nvim',
config = function()
require('plugins.true-zen-nvim')
end
}
use {
'folke/which-key.nvim',
config = function()

View File

@ -8,8 +8,9 @@ require("toggleterm").setup({
vim.keymap.set('n', [[<M-=>]], [[<Cmd>ToggleTerm direction=float<CR>]])
vim.keymap.set('n', [[<M-\>]], [[<Cmd>ToggleTerm direction=horizontal<CR>]])
-- tmux muscle-memory for fullscreening nvim window
vim.keymap.set('n', [[<C-a>z]], [[<Cmd>ToggleTermToggleAll<CR>]])
vim.keymap.set('t', [[<C-a>z]], [[<Cmd>tab split<CR>]])
-- replaced with true-zen.nvim
-- vim.keymap.set('n', [[<C-a>z]], [[<Cmd>ToggleTermToggleAll<CR>]])
-- vim.keymap.set('t', [[<C-a>z]], [[<Cmd>tab split<CR>]])
vim.keymap.set('t', '<Esc>', [[<C-\><C-n>]])
vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd h<CR>]])
vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]])
@ -38,3 +39,22 @@ function _gitui_toggle()
end
vim.keymap.set('n', '<leader>G', '<cmd>lua _gitui_toggle()<CR>', { noremap = true, silent = true })
-- Custom clx commandline hacker news terminal
local clx = Terminal:new({
cmd = 'clx',
direction = 'float',
float_opts = {
border = "curved",
width = function() return math.ceil(vim.o.columns * 0.8) end,
height = function() return math.ceil(vim.o.lines * 0.8) end,
winblend = 3,
},
hidden = true,
})
function _clx_toggle()
clx:toggle()
end
vim.keymap.set('n', '<leader>H', '<cmd>lua _clx_toggle()<CR>', { noremap = true, silent = true })

View File

@ -0,0 +1,10 @@
require('true-zen').setup()
vim.keymap.set('n', '<leader>zn', [[<Cmd>:TZNarrow<CR>]], { noremap = true, silent = true })
vim.keymap.set('v', '<leader>zn', [[<Cmd>:'<,'>TZNarrow<CR>]], { noremap = true, silent = true })
vim.keymap.set('n', '<leader>zf', [[<Cmd>:TZFocus<CR>]], { noremap = true, silent = true })
vim.keymap.set('n', '<leader>zm', [[<Cmd>:TZMinimalist<CR>]], { noremap = true, silent = true })
vim.keymap.set('n', '<leader>za', [[<Cmd>:TZAtaraxis<CR>]], { noremap = true, silent = true })
-- tmux muscle-memory for fullscreening nvim window
vim.keymap.set('n', [[<C-a>z]], [[<Cmd>:TZFocus<CR>]])
vim.keymap.set('t', [[<C-a>z]], [[<Cmd>:TZFocus<CR>]])