From e5e772e86adf16c60105361e62fcc8a9abf7ead1 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 28 Sep 2024 13:56:51 +0200 Subject: added formatoptoins and textwidth --- lua/config/autocmds.lua | 7 ------- lua/config/set.lua | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'lua') diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 0e6fe51..a45b9ae 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -86,10 +86,3 @@ 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", -}) diff --git a/lua/config/set.lua b/lua/config/set.lua index 6a0edd2..08c5d26 100644 --- a/lua/config/set.lua +++ b/lua/config/set.lua @@ -62,6 +62,7 @@ opt.clipboard = "unnamed" opt.showmatch = false -- highlight line at cursor opt.cursorline = true +opt.textwidth = 100 -- status line -- show ruler @@ -84,7 +85,7 @@ opt.smartindent = true opt.scrolloff = 8 opt.spelllang = "en_us,nl" -opt.formatoptions = "cqrnj" +opt.formatoptions = "tocqrnj" -- Get the current working directory, replace the $HOME portion of the path with ~, -- and extract the last three directories -- cgit v1.2.3