mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nvim: improve /* */ comment paring
This commit is contained in:
parent
1e1a6b395f
commit
58dde3289e
1 changed files with 2 additions and 5 deletions
|
|
@ -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" })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue