浏览代码

nixpkgs/neovim: use mini.pairs

Thomas Dy 8 月之前
父节点
当前提交
cb51b7feb6
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      .config/nixpkgs/neovim/plugins.lua

+ 12 - 0
.config/nixpkgs/neovim/plugins.lua

@@ -194,6 +194,18 @@ require('mini.jump').setup({
   },
 })
 
+-- autopair brackets
+require('mini.pairs').setup({
+  mappings = {
+    -- default config includes (, [ and {
+
+    -- autopair <> if preceded by a character, otherwise it might be a regular
+    -- comparison operation
+    ['<'] = { action = 'open', pair = '<>', neigh_pattern = '%w.' },
+    ['>'] = { action = 'close', pair = '<>', neigh_pattern = '%w.' },
+  },
+})
+
 -- notifications
 require('mini.notify').setup()
 vim.notify = require('mini.notify').make_notify()