summaryrefslogtreecommitdiff
path: root/fnl/plugins/autopairs.fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-01-05 01:50:20 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-01-05 01:50:20 +0100
commit2a94573f54c69a9af7536586ab2c03eb88bda5e7 (patch)
tree48e430773d56baef8c751fb8a6b4d76303b61636 /fnl/plugins/autopairs.fnl
parent16198ca3bcd0ddd61f8d18280769c6f226b2b7ce (diff)
Refactor
Diffstat (limited to 'fnl/plugins/autopairs.fnl')
-rw-r--r--fnl/plugins/autopairs.fnl20
1 files changed, 20 insertions, 0 deletions
diff --git a/fnl/plugins/autopairs.fnl b/fnl/plugins/autopairs.fnl
new file mode 100644
index 0000000..36e8ba5
--- /dev/null
+++ b/fnl/plugins/autopairs.fnl
@@ -0,0 +1,20 @@
+;; Autopairs for brackets and quote symbols.
+
+(local opts {:check_ts true
+ :ts_config {:lua [:string :source]
+ :javascript [:string :template_string]
+ :java false}
+ :disable_filetype [:TelescopePrompt :spectre_panel]
+ :fast_warp {:map :<M-e>
+ :chars ["{" "[" "(" "\"" "'"]
+ :pattern (string.gsub "[%'%\"%)%>%]%)%}%,]" "%s+" "")
+ :check_comma true
+ :highlight :PmenuSel
+ :highlight_grey :LineNr
+ :offset 0
+ :end_key "$"
+ :keys :qwertyuiopzxcvbnmasdfghjkl
+ :highlight :PmenuSel
+ :highlight_grey :LineNr}})
+
+{1 :windwp/nvim-autopairs :event :InsertEnter : opts}