Fix autosave for qf & ro comment autocmd

This commit is contained in:
2025-01-02 20:36:05 +01:00
parent 0d3b4be6a5
commit 4e25b64c76
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ return {
return false
end
local ft = vim.fn.getbufvar(buf, "&filetype")
return ft ~= "oil" and ft ~= "harpoon"
return ft ~= "oil" and ft ~= "harpoon" and ft ~= "qf"
end,
},
beforeAll = function()
+3 -3
View File
@@ -115,12 +115,12 @@ vim.api.nvim_create_autocmd("TextYankPost", {
end,
})
vim.api.nvim_create_autocmd("BufEnter", {
vim.api.nvim_create_autocmd("FileType", {
desc = "Disable comment continuation (enter or o/O)",
group = vim.api.nvim_create_augroup("comment-ro", { clear = true }),
callback = function()
vim.opt.formatoptions:remove("ro")
vim.opt_local.formatoptions:remove("ro")
vim.opt.formatoptions:remove({"r", "o"})
vim.opt_local.formatoptions:remove({"r", "o"})
end,
})