summaryrefslogtreecommitdiff
path: root/pkgs/custom-neovim/config/lua/options.lua
diff options
context:
space:
mode:
authortriethyl <triethylammonium@pm.me>2025-08-26 18:35:14 -0400
committertriethyl <triethylammonium@pm.me>2025-08-26 18:35:14 -0400
commitf5f0d7bc38095aebe74ebf2a97ba823a8a57b8b8 (patch)
tree70d451c4cbc37dedbc8069a4c8a0171ae64ad2b1 /pkgs/custom-neovim/config/lua/options.lua
parentfeede85ca98128a8b1f0c91b369d51dd7c854d8c (diff)
neovim: misc changes
Diffstat (limited to 'pkgs/custom-neovim/config/lua/options.lua')
-rw-r--r--pkgs/custom-neovim/config/lua/options.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/custom-neovim/config/lua/options.lua b/pkgs/custom-neovim/config/lua/options.lua
index 67c4469..2fdb796 100644
--- a/pkgs/custom-neovim/config/lua/options.lua
+++ b/pkgs/custom-neovim/config/lua/options.lua
@@ -51,3 +51,9 @@ vim.o.shiftround = true -- use multiple of shiftwidth when indenting with "<" an
vim.o.backup = false -- create a backup file
vim.o.swapfile = false -- creates a swapfile
vim.o.writebackup = false -- if a file is being edited by another program, it is not allowed to be edited
+
+-- Autocommands
+
+-- Prevent Comments on Newlines
+-- c: wrap text to textwidth, r: add comment when pressing enter in insert mode, o: add comment when pressing o
+vim.api.nvim_create_autocmd("BufEnter", { callback = function() vim.opt.formatoptions = vim.opt.formatoptions - { "c","r","o" } end, })