diff --git a/neovim/.config/nvim/after/plugin/remaps.lua b/neovim/.config/nvim/after/plugin/remaps.lua index e52434c..d7b1c04 100644 --- a/neovim/.config/nvim/after/plugin/remaps.lua +++ b/neovim/.config/nvim/after/plugin/remaps.lua @@ -27,11 +27,14 @@ vim.keymap.set("n", "H", ":tabprev") vim.keymap.set("n", "L", ":tabnext") -- quickfix +vim.g.daniil_quickfix_opened = 0 vim.keymap.set("n", "", function() - if vim.bo.ft == "qf" then + if vim.g.daniil_quickfix_opened == 1 then vim.cmd(":cclose") + vim.g.daniil_quickfix_opened = 0 else vim.cmd(":copen") + vim.g.daniil_quickfix_opened = 1 end end) vim.keymap.set("n", "n", vim.cmd.cnext)