From c338a0b580cf00e9d36a747047620b6d98e7777d Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Fri, 20 Oct 2023 16:59:32 -0700 Subject: [PATCH] Add sourcegraph --- neovim/lua/plugins.lua | 10 ++++++++++ neovim/lua/plugins/telescope.lua | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/neovim/lua/plugins.lua b/neovim/lua/plugins.lua index 88ba6de..62090c0 100644 --- a/neovim/lua/plugins.lua +++ b/neovim/lua/plugins.lua @@ -522,6 +522,16 @@ use({ }, }) +-- Work things +-- Sourcegraph +use({ + "sourcegraph/sg.nvim", + run = "nvim -l build/init.lua", + requires = { + "nvim-lua/plenary.nvim", + }, +}) + -- Auto sync after bootstrapping on a fresh box if packer_bootstrap ~= "" then packer.sync() diff --git a/neovim/lua/plugins/telescope.lua b/neovim/lua/plugins/telescope.lua index ac249ea..edd2ab6 100644 --- a/neovim/lua/plugins/telescope.lua +++ b/neovim/lua/plugins/telescope.lua @@ -53,6 +53,14 @@ local function config_telescope() finder_keymap("t", "lua require('telescope.builtin').current_buffer_tags()", { desc = "Find buffer tags" }) finder_keymap("T", "lua require('telescope.builtin').tags()", { desc = "Find tags" }) + if utils.can_require("sg.telescope") then + finder_keymap( + "G", + "lua require('sg.telescope').fuzzy_search_results()", + { desc = "Search Sourcegraph" } + ) + end + load_extensions() end