add keymap to close buffer with q

main
Micke Nordin 4 days ago
parent a72f85ce15
commit ac9417c8f2

@ -69,8 +69,9 @@ telescope_knot.zones = function(opts)
vim.api.nvim_buf_set_lines(buffer, 0, 0, false, record)
local width = vim.api.nvim_win_get_width(0)
local height = vim.api.nvim_win_get_height(0) - 10
local win = vim.api.nvim_open_win(buffer, true,
vim.api.nvim_open_win(buffer, true,
{ relative = 'win', bufpos = { 0, 0 }, width = width, height = height, border = 'rounded' })
vim.api.nvim_buf_set_keymap(buffer, "n", "q", "<CMD>bd<CR>", {})
vim.api.nvim_buf_set_keymap(buffer, "c", "w",
"lua vim.api.nvim_exec_autocmds('User', { pattern = 'KnotWrite' })<CR>", {})
vim.api.nvim_create_autocmd({ "User" }, {

Loading…
Cancel
Save