ソースを参照

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()