diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-09-25 01:42:24 +0200 |
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-09-25 01:47:29 +0200 |
| commit | 68636ef01a9c3c758379d25dc85d68d649a156e2 (patch) | |
| tree | ccda398a627cd08a4cd2e0a4537f147614712fb9 /lua/config/autocmds.lua | |
| parent | 4b90644bc355441d05fb1a217e7d828f1cfd77b8 (diff) | |
checkpoint
Diffstat (limited to 'lua/config/autocmds.lua')
| -rw-r--r-- | lua/config/autocmds.lua | 17 |
1 files changed, 7 insertions, 10 deletions
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", +}) |
