A simple plugin to simplify searching for code on Github Code Search.
In normal
mode, searches for the word under the cursor.
In visual
mode, searches for the selected text.
2023-03-20.18-09-00.mp4
-- Install with Lazy
{
"thenbe/csgithub.nvim",
keys = {
{
"<leader>feg",
function()
local csgithub = require("csgithub")
local url = csgithub.search({
includeFilename = false,
includeExtension = true,
betaSearch = true, -- set to false if you haven't opted in to GitHub Code Search (beta)
})
csgithub.open(url)
end,
mode = { "n", "v" },
desc = "Search Github",
},
},
}