summaryrefslogtreecommitdiff
path: root/lua/config
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-09-28 13:56:51 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-09-28 13:56:51 +0200
commite5e772e86adf16c60105361e62fcc8a9abf7ead1 (patch)
tree7875dbc4b990c63a905b0c85d22fec005879f2c8 /lua/config
parentb7a7a40ff171aa2e6b7db87736f2c9f777aa464b (diff)
added formatoptoins and textwidth
Diffstat (limited to 'lua/config')
-rw-r--r--lua/config/autocmds.lua7
-rw-r--r--lua/config/set.lua3
2 files changed, 2 insertions, 8 deletions
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