From 3cfd34313ee20174329290c2c6065f0f43c430ed Mon Sep 17 00:00:00 2001 From: tiyn <tiyn@posteo.eu> Date: Mon, 24 Mar 2025 04:34:23 +0100 Subject: [PATCH] nvim: changed bracket program --- .config/nvim/lazy-lock.json | 3 +- .config/nvim/lua/plugins/blink-pairs.lua | 34 ++++++++++++++++++++ .config/nvim/lua/plugins/nvim-autopairs.lua | 7 ---- .config/nvim/lua/plugins/nvim-treesitter.lua | 2 +- 4 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 .config/nvim/lua/plugins/blink-pairs.lua delete mode 100644 .config/nvim/lua/plugins/nvim-autopairs.lua diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 8fc2709..1d4a3d8 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,6 +1,8 @@ { "action-hints.nvim": { "branch": "main", "commit": "ab10fef255dd4bc933c92d8f9969828f2f856e71" }, "barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" }, + "blink.download": { "branch": "main", "commit": "d95072328fb8293cc62c2574b0de2026e74d6f92" }, + "blink.pairs": { "branch": "main", "commit": "903cddb0ba5b47f48ebb43574ba202c88e0dab07" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, @@ -33,7 +35,6 @@ "modes.nvim": { "branch": "main", "commit": "1e34663c32e8f5d915921a938e0dc4e3e788ceb8" }, "molten-nvim": { "branch": "main", "commit": "a286aa914d9a154bc359131aab788b5a077a5a99" }, "none-ls.nvim": { "branch": "main", "commit": "a117163db44c256d53c3be8717f3e1a2a28e6299" }, - "nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" }, "nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" }, "nvim-colorizer.lua": { "branch": "master", "commit": "6ed09146ee637006367b5e225be6208a1ea02579" }, "nvim-docs-view": { "branch": "master", "commit": "1b97f8f954d74c46061bf289b6cea9232484c12c" }, diff --git a/.config/nvim/lua/plugins/blink-pairs.lua b/.config/nvim/lua/plugins/blink-pairs.lua new file mode 100644 index 0000000..359c9c2 --- /dev/null +++ b/.config/nvim/lua/plugins/blink-pairs.lua @@ -0,0 +1,34 @@ +return { + "saghen/blink.pairs", + version = "*", -- (recommended) only required with prebuilt binaries + + -- download prebuilt binaries from github releases + dependencies = "saghen/blink.download", + + --- @module 'blink.pairs' + --- @type blink.pairs.Config + opts = { + mappings = { + enabled = true, + pairs = { + ["("] = ")", + ["["] = "]", + ["{"] = "}", + ["'"] = { closing = "'", enter = false }, + ['"'] = { closing = '"', enter = false }, + ["`"] = { closing = "`", enter = false }, + }, + }, + highlights = { + enabled = true, + groups = { + "BlinkPairsOrange", + "BlinkPairsPurple", + "BlinkPairsBlue", + }, + priority = 200, + ns = vim.api.nvim_create_namespace("blink.pairs"), + }, + debug = false, + }, +} diff --git a/.config/nvim/lua/plugins/nvim-autopairs.lua b/.config/nvim/lua/plugins/nvim-autopairs.lua deleted file mode 100644 index 483083d..0000000 --- a/.config/nvim/lua/plugins/nvim-autopairs.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - -- automatic closing of brackets - { - 'windwp/nvim-autopairs', - opts = {} - } -} diff --git a/.config/nvim/lua/plugins/nvim-treesitter.lua b/.config/nvim/lua/plugins/nvim-treesitter.lua index 3640b27..24f07d5 100644 --- a/.config/nvim/lua/plugins/nvim-treesitter.lua +++ b/.config/nvim/lua/plugins/nvim-treesitter.lua @@ -24,7 +24,7 @@ return { highlight = { enable = true }, autotag = { enable = false }, rainbow = { - enable = false, + enable = true, extended_mode = true, max_file_lines = nil, -- colors = {},