From c167f6ecf9c4e21846b608d9d96fee6d32fd7e8b Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Tue, 6 Feb 2024 23:50:18 +0100 Subject: nvim: parenthesis better done --- nvim/nvim/init.lua | 6 ++---- nvim/nvim/lua/parens.lua | 8 ++++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/nvim/nvim/init.lua b/nvim/nvim/init.lua index 51be587..1145a29 100644 --- a/nvim/nvim/init.lua +++ b/nvim/nvim/init.lua @@ -5,11 +5,9 @@ vim.cmd.filetype("off") local Plug = vim.fn['plug#'] vim.fn["plug#begin"]() Plug("nvim-treesitter/nvim-treesitter") - Plug("julienvincent/nvim-paredit") -- Keeps parens balanced + Plug("julienvincent/nvim-paredit") -- Some paredit commands Plug("ekaitz-zarraga/nvim-paredit-scheme") -- Scheme extension - Plug("gpanders/nvim-parinfer") -- Parinfer helps with formatting - Plug("dundalek/parpar.nvim") -- Parinfer and Paredit work together - Plug("sgur/vim-editorconfig") + Plug("windwp/nvim-autopairs") -- Autobalance parens Plug("dracula/vim") Plug("othree/html5.vim") Plug("zaid/vim-rec") diff --git a/nvim/nvim/lua/parens.lua b/nvim/nvim/lua/parens.lua index fe3072f..e07bbc2 100644 --- a/nvim/nvim/lua/parens.lua +++ b/nvim/nvim/lua/parens.lua @@ -1,6 +1,6 @@ local paredit = require "nvim-paredit" -local parpar = require "parpar" local scheme = require "nvim-paredit-scheme" +local autopairs = require "nvim-autopairs" paredit.setup({ -- should plugin use default keybindings? (default = true) @@ -220,4 +220,8 @@ paredit.setup({ scheme.setup(paredit) -parpar.setup { paredit = paredit } +autopairs.setup { + check_ts = true, + enable_check_bracket_line = false +} +autopairs.get_rules("'")[1].not_filetypes = { "scheme", "lisp", "clojure"} -- cgit v1.2.3