mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
implements multiple todos
This commit is contained in:
parent
ef7b5680fb
commit
2aee2088c4
24 changed files with 355 additions and 331 deletions
|
|
@ -25,27 +25,4 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||
end,
|
||||
})
|
||||
|
||||
--- buffer that doesn't act as an editor or common buffer.
|
||||
--- Use `q` to close the buffer.
|
||||
local tmp_buf = {
|
||||
"qf", -- quickfix
|
||||
"crunner", -- code runner
|
||||
}
|
||||
|
||||
M.tmp_buf_keymaps = {
|
||||
{ mode = "n", keys = "q", cmd = "<Cmd>q<CR>", desc = "Close buffer" },
|
||||
}
|
||||
|
||||
for _, buf in ipairs(tmp_buf) do
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = buf,
|
||||
callback = function()
|
||||
for _, map in ipairs(M.tmp_buf_keymaps) do
|
||||
local opts = vim.tbl_extend("force", { buffer = 0 }, map.opts or {})
|
||||
vim.keymap.set(map.mode, map.keys, map.cmd, opts)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue