diff options
-rw-r--r-- | .config/nvim/lua/mango/set.lua | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/.config/nvim/lua/mango/set.lua b/.config/nvim/lua/mango/set.lua index 28c5cf2..9428df5 100644 --- a/.config/nvim/lua/mango/set.lua +++ b/.config/nvim/lua/mango/set.lua @@ -1,4 +1,5 @@ local lib = require('mango.lib') +local api = vim.api local opt = vim.opt opt.nu = true @@ -29,8 +30,17 @@ opt.updatetime = 50 opt.colorcolumn = '81' --- Disable auto commenting -vim.bo.formatoptions = 'jnql' - opt.splitright = true opt.splitbelow = true + +-- Disable auto commenting +local group = api.nvim_create_augroup('Mango', { clear = true }) +api.nvim_create_autocmd( + 'BufEnter', + { + callback = function() + opt.formatoptions:remove({'c', 'r', 'o'}) + end, + group = group, + } +) |