From 4471902d936680feb24e2f014e6a40fa77c67388 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Tue, 23 Jul 2024 22:08:17 +0200 Subject: [PATCH 1/3] maximize height of overseer log --- lua/custom/plugins/overseer.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/custom/plugins/overseer.lua b/lua/custom/plugins/overseer.lua index 34131ce..475a6f0 100644 --- a/lua/custom/plugins/overseer.lua +++ b/lua/custom/plugins/overseer.lua @@ -15,6 +15,7 @@ return { -- Display status info about tasks vim.keymap.set('n', 'ol', function() overseer.toggle { winid = 0 } + vim.cmd.winc '_' end, { desc = '[O]verseer [L]og' }) -- Run task by listing all in floating vim.keymap.set('n', 'or', 'OverseerRun', { desc = '[O]verseer [R]un' }) From 3175322e7f7e305652b33ee0f2e104b8cd39ec2d Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Tue, 23 Jul 2024 22:08:55 +0200 Subject: [PATCH 2/3] allow closing of overseer log with toggle keymap --- lua/custom/plugins/overseer.lua | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins/overseer.lua b/lua/custom/plugins/overseer.lua index 475a6f0..ab94c49 100644 --- a/lua/custom/plugins/overseer.lua +++ b/lua/custom/plugins/overseer.lua @@ -12,10 +12,25 @@ return { }, } + -- Reference: overseer.nvim/lua/overseer/window.lua + local function is_open() + for _, winid in ipairs(vim.api.nvim_tabpage_list_wins(0)) do + local bufnr = vim.api.nvim_win_get_buf(winid) + if vim.bo[bufnr].filetype == 'OverseerList' then + return true + end + end + return false + end + -- Display status info about tasks vim.keymap.set('n', 'ol', function() overseer.toggle { winid = 0 } - vim.cmd.winc '_' + if is_open() then + vim.cmd.winc '_' + else + vim.api.nvim_buf_delete(vim.api.nvim_get_current_buf(), {}) + end end, { desc = '[O]verseer [L]og' }) -- Run task by listing all in floating vim.keymap.set('n', 'or', 'OverseerRun', { desc = '[O]verseer [R]un' }) From 9cd6ce3279e78e369694e7390adfe7ee80ab714c Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Tue, 23 Jul 2024 22:09:24 +0200 Subject: [PATCH 3/3] disable conflicting/broken overseer keymaps --- lua/custom/plugins/overseer.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/custom/plugins/overseer.lua b/lua/custom/plugins/overseer.lua index ab94c49..51946f0 100644 --- a/lua/custom/plugins/overseer.lua +++ b/lua/custom/plugins/overseer.lua @@ -10,6 +10,15 @@ return { 'golang.run_project', 'golang.run_file', }, + task_list = { + bindings = { + [''] = false, + [''] = false, + [''] = false, + [''] = false, + ['q'] = false, + }, + }, } -- Reference: overseer.nvim/lua/overseer/window.lua