diff --git a/.config/nvim/plugin/autopairs.lua b/.config/nvim/plugin/autopairs.lua index 1054e98b..77560579 100644 --- a/.config/nvim/plugin/autopairs.lua +++ b/.config/nvim/plugin/autopairs.lua @@ -54,12 +54,9 @@ pair_with_insertion("[", " ", "]", { "typst", "python", "haskell", "nix", "sh" } pair_with_insertion("{", " ", "}", nil) npairs.add_rules { - Rule("*", "*/", { "typst", "go", "rust", "scss" }) - :with_pair(function(opts) return "/" == opts.line:sub(opts.col - 1, opts.col) end) - :with_del(cond.none()) -- this is only a partial rule, deletion doesn't make sense - :with_move(cond.none()), -- allow java doc + Rule("/*", "*/", { "typst", "go", "rust", "scss", "nix" }):with_del(cond.done()):with_move(cond.none()), -- allow java doc } -pair_with_insertion("/*", " ", "*/", { "typst", "go", "java", "rust", "scss" }) +pair_with_insertion("/*", " ", "*/", { "typst", "go", "java", "rust", "scss", "nix" }) pair_with_insertion("{", "#", "}", { "html", "htmldjango" }) pair_with_insertion("{#", " ", "#}", { "html", "htmldjango" })