mirror of
https://github.com/zoriya/flake.git
synced 2026-05-30 09:39:01 +00:00
Fix autosave for qf & ro comment autocmd
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user