# HG changeset patch # User Meredith Howard # Date 1704014616 18000 # Node ID 00240c15eca5df62388a1bc083dfc6f3477ef018 # Parent 40b6fc3abd44d429b69aa4dda93811f69d0b2daa only do autopairs bracket endwise at end of line diff --git a/.config/nvim/lua/plugins/editing.lua b/.config/nvim/lua/plugins/editing.lua --- a/.config/nvim/lua/plugins/editing.lua +++ b/.config/nvim/lua/plugins/editing.lua @@ -56,7 +56,9 @@ return { for _,bracket in pairs { { '(', ')' }, { '[', ']' }, { '{', '}' } } do npairs.add_rules { Rule(bracket[1], bracket[2]) - :end_wise(function() return true end) + :end_wise(function(opts) + return opts.next_char == '' + end) } end end,