From ddcd313eef7aaea8561c6d249df5532100219ea7 Mon Sep 17 00:00:00 2001 From: Devin Haska <2636402+wonderfulfrog@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:05:55 -0800 Subject: [PATCH] fix: remove autocmd for quit on q This was causing issues with fugitive and committing changes via git. --- lua/autocmds.lua | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lua/autocmds.lua b/lua/autocmds.lua index c22d83d..df5c406 100644 --- a/lua/autocmds.lua +++ b/lua/autocmds.lua @@ -1,21 +1,21 @@ local function augroup(name) - return vim.api.nvim_create_augroup("wf_" .. name, { clear = true }) + return vim.api.nvim_create_augroup("wf_" .. name, { clear = true }) end vim.api.nvim_create_autocmd({ "FileType" }, { - group = augroup("spellcheck"), - pattern = { "gitcommit", "markdown", "md", "mdx" }, - callback = function() - vim.opt_local.spell = true - vim.opt_local.wrap = true - end + group = augroup("spellcheck"), + pattern = { "gitcommit", "markdown", "md", "mdx" }, + callback = function() + vim.opt_local.spell = true + vim.opt_local.wrap = true + end, }) -vim.api.nvim_create_autocmd({ "FileType" }, { - group = augroup("close_with_q"), - pattern = { "fugitive", "git", "gitcommit" }, - callback = function(event) - vim.bo[event.buf].buflisted = false - vim.keymap.set("n", "q", "close", { buffer = event.buf, silent = true }) - end -}) +-- vim.api.nvim_create_autocmd({ "FileType" }, { +-- group = augroup("close_with_q"), +-- pattern = { "fugitive", "git", "gitcommit" }, +-- callback = function(event) +-- vim.bo[event.buf].buflisted = false +-- vim.keymap.set("n", "q", "close", { buffer = event.buf, silent = true }) +-- end +-- })