mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-26 05:11:45 +00:00
comment longer overseer keymap
This commit is contained in:
parent
08f5acc7ed
commit
57212d3f27
@ -35,17 +35,22 @@ return {
|
|||||||
|
|
||||||
-- Display status info about tasks
|
-- Display status info about tasks
|
||||||
vim.keymap.set('n', '<leader>ol', function()
|
vim.keymap.set('n', '<leader>ol', function()
|
||||||
|
-- Get currently open windows (detects splits)
|
||||||
local curWindows = #vim.api.nvim_tabpage_list_wins(0)
|
local curWindows = #vim.api.nvim_tabpage_list_wins(0)
|
||||||
|
-- Use builtin toggle if already using splits
|
||||||
if curWindows ~= (is_open() and 2 or 1) then
|
if curWindows ~= (is_open() and 2 or 1) then
|
||||||
vim.cmd 'OverseerToggle'
|
vim.cmd 'OverseerToggle'
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Otherwise, toggle overseer in fullscreen
|
||||||
overseer.toggle { winid = 0 }
|
overseer.toggle { winid = 0 }
|
||||||
local bufnr = vim.api.nvim_get_current_buf()
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
if is_open() then
|
if is_open() then
|
||||||
|
-- Maximize height
|
||||||
vim.cmd.winc '_'
|
vim.cmd.winc '_'
|
||||||
elseif vim.bo[bufnr].filetype == '' and vim.bo.buftype ~= 'terminal' then
|
elseif vim.bo[bufnr].filetype == '' and vim.bo.buftype ~= 'terminal' then
|
||||||
|
-- Delete empty buffer created by overseer
|
||||||
vim.api.nvim_buf_delete(bufnr, {})
|
vim.api.nvim_buf_delete(bufnr, {})
|
||||||
end
|
end
|
||||||
end, { desc = '[O]verseer [L]og' })
|
end, { desc = '[O]verseer [L]og' })
|
||||||
|
Loading…
Reference in New Issue
Block a user