From e38a41a9e00945c547c998abae37c1a3e7aa9cce Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Mon, 25 Mar 2024 16:10:43 -0500 Subject: [PATCH] chg: Disable space around = for makefiles --- laptop/plugin/autopairs.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/laptop/plugin/autopairs.lua b/laptop/plugin/autopairs.lua index 8ef1245..e6e2366 100644 --- a/laptop/plugin/autopairs.lua +++ b/laptop/plugin/autopairs.lua @@ -59,7 +59,7 @@ end -- Add space around = npairs.add_rules { - Rule('=', '', { "-tex", "-vim", "-sh", "-dockerfile" }) + Rule('=', '', { "-tex", "-vim", "-sh", "-dockerfile", "-make" }) :with_pair(cond.not_inside_quote()) :with_pair(function(opts) local last_char = opts.line:sub(opts.col - 1, opts.col - 1) @@ -98,7 +98,7 @@ function rule2(a1, ins, a2, lang) :with_del(function(opts) local col = vim.api.nvim_win_get_cursor(0)[2] return a1 .. ins .. ins .. a2 == - opts.line:sub(col - #a1 - #ins + 1, col + #ins + #a2) -- insert only works for #ins == 1 anyway + opts.line:sub(col - #a1 - #ins + 1, col + #ins + #a2) -- insert only works for #ins == 1 anyway end) ) end