From 202bb2ba6f091bef6bc491ea78e535f87378aaa9 Mon Sep 17 00:00:00 2001 From: t0xa Date: Sun, 22 Feb 2026 15:07:35 +0300 Subject: [PATCH] Update some neovim files --- init.lua | 2 -- lua/custom/trouble.lua | 20 +++++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 83983de..7f4af20 100644 --- a/init.lua +++ b/init.lua @@ -39,5 +39,3 @@ require("lazy").setup({ -- automatically check for plugin updates checker = { enabled = false }, }) - - diff --git a/lua/custom/trouble.lua b/lua/custom/trouble.lua index e22abbc..6a3899b 100644 --- a/lua/custom/trouble.lua +++ b/lua/custom/trouble.lua @@ -15,14 +15,16 @@ vim.keymap.set("n", "xQ", "Trouble qflist toggle", { desc = "Qu -- Telescope integration -- local actions = require("telescope.actions") -local open_with_trouble = require("trouble.sources.telescope").open -- local add_to_trouble = require("trouble.sources.telescope").add - -require("telescope").setup({ - defaults = { - mappings = { - i = { [""] = open_with_trouble }, - n = { [""] = open_with_trouble }, +local ok, telescope = pcall(require, "telescope") +if ok then + local open_with_trouble = require("trouble.sources.telescope").open + telescope.setup({ + defaults = { + mappings = { + i = { [""] = open_with_trouble }, + n = { [""] = open_with_trouble }, + }, }, - }, -}) + }) +end