From 145bbd1996a4e05efd676dd85b8c64b9fe1384a1 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Tue, 15 Jul 2025 16:57:41 +0500 Subject: [PATCH] fix missing opts for plugin initialization --- .config/nvim/lua/user/plugins/autopairs.lua | 15 ++++++--------- .config/nvim/lua/user/plugins/nvim_scrollbar.lua | 4 +++- .config/nvim/lua/user/plugins/snipptes.lua | 14 ++++++++------ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.config/nvim/lua/user/plugins/autopairs.lua b/.config/nvim/lua/user/plugins/autopairs.lua index f73b03c..068c375 100644 --- a/.config/nvim/lua/user/plugins/autopairs.lua +++ b/.config/nvim/lua/user/plugins/autopairs.lua @@ -21,14 +21,11 @@ return { highlight_grey = "LineNr", }, }, - config = function () - require("nvim-autopairs").setup() - -- require ("nvim-autopairs.completion.cmp") - -- local cmp_status_ok, cmp = pcall(require, "cmp") - -- if not cmp_status_ok then - -- return - -- end - -- cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } }) + config = function(_, opts) + require("nvim-autopairs").setup(opts) + + local cmp_autopairs = require("nvim-autopairs.completion.cmp") + local cmp = require "cmp" + cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } }) end } - diff --git a/.config/nvim/lua/user/plugins/nvim_scrollbar.lua b/.config/nvim/lua/user/plugins/nvim_scrollbar.lua index f122541..55e9e62 100644 --- a/.config/nvim/lua/user/plugins/nvim_scrollbar.lua +++ b/.config/nvim/lua/user/plugins/nvim_scrollbar.lua @@ -1,5 +1,7 @@ return { "petertriho/nvim-scrollbar", event = "VeryLazy", - config = true + config = function (_, opts) + require("scrollbar").setup(opts) + end } diff --git a/.config/nvim/lua/user/plugins/snipptes.lua b/.config/nvim/lua/user/plugins/snipptes.lua index d8b2bbb..caefdc5 100644 --- a/.config/nvim/lua/user/plugins/snipptes.lua +++ b/.config/nvim/lua/user/plugins/snipptes.lua @@ -1,9 +1,11 @@ return { - { "L3MON4D3/LuaSnip", event = "VeryLazy" }, --snippet engine - { "rafamadriz/friendly-snippets", event = "VeryLazy" }, -- a bunch of snippets to use { - "dsznajder/vscode-es7-javascript-react-snippets", - run = "yarn install --frozen-lockfile && yarn compile", - event = "VeryLazy" - }, + "L3MON4D3/LuaSnip", + event = "VeryLazy", + config = true, + dependencies = { + "rafamadriz/friendly-snippets", + -- "dsznajder/vscode-es7-javascript-react-snippets", + } + } }