Sun, 31 Dec 2023 04:23:36 -0500
only do autopairs bracket endwise at end of line
.config/nvim/lua/plugins/editing.lua | file | annotate | diff | comparison | revisions |
--- 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,