From 591a14c42adaea9476fc828c74872f990b5ee643 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sun, 24 Mar 2024 21:25:16 +0100 Subject: [PATCH] Trully fix tee commenting issue. --- home-manager/modules/nvim.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/home-manager/modules/nvim.nix b/home-manager/modules/nvim.nix index 04ece8e..fe3b694 100644 --- a/home-manager/modules/nvim.nix +++ b/home-manager/modules/nvim.nix @@ -54,13 +54,23 @@ }; extraConfigLuaPre = '' - vim.loader.enable() + local autocmd = vim.api.nvim_create_autocmd + local augroup = vim.api.nvim_create_augroup + + -- General Settings + local general = augroup("General Settings", { clear = true }) + + autocmd("BufEnter", { + callback = function() + vim.opt.formatoptions:remove { "c", "r", "o" } + end, + group = general, + desc = "Disable New Line Comment", + }) ''; extraConfigLuaPost = '' vim.notify = require("mini.notify").make_notify() - - vim.opt.formatoptions:remove({'c', 'r', 'o'}) ''; extraPackages = with pkgs; [ stylua