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