From f7f49f1f6e23777ecb8052059b1bd09ce7aeb9c2 Mon Sep 17 00:00:00 2001 From: Ian Roddis <31021769+iroddis@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:50:43 -0400 Subject: [PATCH] Removing ro --- init.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index e35d454..c1d5480 100644 --- a/init.lua +++ b/init.lua @@ -307,7 +307,6 @@ require('lazy').setup({ vim.opt.ai = true -- Autoindent vim.opt.updatetime = 50 vim.mouse = '' -vim.cmd [[set formatoptions-=o]] -- Whitespace vim.opt.tabstop = 2 @@ -838,5 +837,14 @@ vim.api.nvim_set_hl(0, "Matchadd_6", { bg = colors.yellow, fg = 0 }) -- Automatically format vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]] +-- Because nvim filetypes are stupid ... need to disable formatoptions for all file types +vim.api.nvim_create_autocmd("FileType", { + pattern = "*", + callback = function() + vim.opt.formatoptions:remove("r") + vim.opt.formatoptions:remove("o") + end +}) + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et