From 68636ef01a9c3c758379d25dc85d68d649a156e2 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 25 Sep 2024 01:42:24 +0200 Subject: checkpoint --- lua/config/autocmds.lua | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'lua/config/autocmds.lua') diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index d39ab1a..0e6fe51 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -23,16 +23,6 @@ autocmd("BufWritePre", { end, }) --- Run gofmt + goimports on save -local format_sync_grp = vim.api.nvim_create_augroup("goimports", {}) -autocmd("BufWritePre", { - pattern = "*.go", - callback = function() - require("go.format").goimports() - end, - group = format_sync_grp, -}) - autocmd("TermOpen", { callback = function() local o = vim.opt_local @@ -96,3 +86,10 @@ autocmd({ "BufNewFile", "BufRead" }, { -- Automatically resize panes autocmd("VimResized", { pattern = "*", command = "wincmd =" }) + +vim.api.nvim_create_autocmd("BufEnter", { + callback = function() + vim.opt.formatoptions:remove({ "c", "r", "o" }) + end, + desc = "Disable New Line Comment", +}) -- cgit v1.2.3-70-g09d2