diff --git a/lua/install-plugins.lua b/lua/install-plugins.lua index 79d59e4..97f98cd 100644 --- a/lua/install-plugins.lua +++ b/lua/install-plugins.lua @@ -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() diff --git a/lua/plugins/toggleterm-nvim.lua b/lua/plugins/toggleterm-nvim.lua index af60d79..0d6fa3a 100644 --- a/lua/plugins/toggleterm-nvim.lua +++ b/lua/plugins/toggleterm-nvim.lua @@ -8,8 +8,9 @@ require("toggleterm").setup({ vim.keymap.set('n', [[]], [[ToggleTerm direction=float]]) vim.keymap.set('n', [[]], [[ToggleTerm direction=horizontal]]) -- tmux muscle-memory for fullscreening nvim window -vim.keymap.set('n', [[z]], [[ToggleTermToggleAll]]) -vim.keymap.set('t', [[z]], [[tab split]]) +-- replaced with true-zen.nvim +-- vim.keymap.set('n', [[z]], [[ToggleTermToggleAll]]) +-- vim.keymap.set('t', [[z]], [[tab split]]) vim.keymap.set('t', '', [[]]) vim.keymap.set('t', '', [[wincmd h]]) vim.keymap.set('t', '', [[wincmd k]]) @@ -38,3 +39,22 @@ function _gitui_toggle() end vim.keymap.set('n', 'G', 'lua _gitui_toggle()', { 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', 'H', 'lua _clx_toggle()', { noremap = true, silent = true }) diff --git a/lua/plugins/true-zen-nvim.lua b/lua/plugins/true-zen-nvim.lua new file mode 100644 index 0000000..9fc5888 --- /dev/null +++ b/lua/plugins/true-zen-nvim.lua @@ -0,0 +1,10 @@ +require('true-zen').setup() + +vim.keymap.set('n', 'zn', [[:TZNarrow]], { noremap = true, silent = true }) +vim.keymap.set('v', 'zn', [[:'<,'>TZNarrow]], { noremap = true, silent = true }) +vim.keymap.set('n', 'zf', [[:TZFocus]], { noremap = true, silent = true }) +vim.keymap.set('n', 'zm', [[:TZMinimalist]], { noremap = true, silent = true }) +vim.keymap.set('n', 'za', [[:TZAtaraxis]], { noremap = true, silent = true }) +-- tmux muscle-memory for fullscreening nvim window +vim.keymap.set('n', [[z]], [[:TZFocus]]) +vim.keymap.set('t', [[z]], [[:TZFocus]])