remove keys
This commit is contained in:
parent
91e6fbe455
commit
57be0c0044
4 changed files with 15 additions and 25 deletions
|
|
@ -21,6 +21,16 @@ function M.handle_cache_command(cmd)
|
|||
vim.api.nvim_buf_set_name(buf, name)
|
||||
vim.api.nvim_buf_set_lines(buf, 0, -1, false, vim.split(data, '\n'))
|
||||
vim.bo[buf].filetype = 'lua'
|
||||
vim.bo[buf].buftype = 'nofile'
|
||||
vim.bo[buf].bufhidden = 'wipe'
|
||||
vim.bo[buf].swapfile = false
|
||||
vim.api.nvim_buf_set_keymap(
|
||||
buf,
|
||||
'n',
|
||||
'q',
|
||||
'<cmd>bd!<cr>',
|
||||
{ nowait = true, noremap = true, silent = true }
|
||||
)
|
||||
end
|
||||
|
||||
vim.api.nvim_set_current_buf(buf)
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@
|
|||
---@field diff_mode "none"|"vim"|"git" Diff backend to use
|
||||
---@field next_test_key string Key to navigate to next test case
|
||||
---@field prev_test_key string Key to navigate to previous test case
|
||||
---@field toggle_diff_key string Key to cycle through diff modes
|
||||
---@field close_key string Key to close panel/interactive terminal
|
||||
---@field max_output_lines number Maximum lines of test output to display
|
||||
|
||||
---@class DiffGitConfig
|
||||
|
|
@ -104,8 +102,6 @@ M.defaults = {
|
|||
diff_mode = 'none',
|
||||
next_test_key = '<c-n>',
|
||||
prev_test_key = '<c-p>',
|
||||
toggle_diff_key = '<c-t>',
|
||||
close_key = '<c-q>',
|
||||
max_output_lines = 50,
|
||||
},
|
||||
diff = {
|
||||
|
|
@ -224,20 +220,6 @@ function M.setup(user_config)
|
|||
end,
|
||||
'prev_test_key must be a non-empty string',
|
||||
},
|
||||
toggle_diff_key = {
|
||||
config.run_panel.toggle_diff_key,
|
||||
function(value)
|
||||
return type(value) == 'string' and value ~= ''
|
||||
end,
|
||||
'toggle_diff_key must be a non-empty string',
|
||||
},
|
||||
close_key = {
|
||||
config.run_panel.close_key,
|
||||
function(value)
|
||||
return type(value) == 'string' and value ~= ''
|
||||
end,
|
||||
'close_key must be a non-empty string',
|
||||
},
|
||||
max_output_lines = {
|
||||
config.run_panel.max_output_lines,
|
||||
function(value)
|
||||
|
|
|
|||
|
|
@ -237,10 +237,10 @@ function M.toggle_run_panel(is_debug)
|
|||
end
|
||||
|
||||
setup_keybindings_for_buffer = function(buf)
|
||||
vim.keymap.set('n', config.run_panel.close_key, function()
|
||||
vim.keymap.set('n', 'q', function()
|
||||
M.toggle_run_panel()
|
||||
end, { buffer = buf, silent = true })
|
||||
vim.keymap.set('n', config.run_panel.toggle_diff_key, function()
|
||||
vim.keymap.set('n', 't', function()
|
||||
local modes = { 'none', 'git', 'vim' }
|
||||
local current_idx = nil
|
||||
for i, mode in ipairs(modes) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue