gsearch is a Telescope-powered tool to allow you to use Google from neovim.
You can alternatively view this all in vim by running :help gsearch
.
gsearch.mov
How to get gsearch in your neovim configuration.
- Telescope
- macOS or Linux
With vim-plug
Plug "nvim-telescope/telescope.nvim", { "tag": "0.1.0" }
Plug "dzfrias/gsearch.nvim"
With packer.nvim
use {
"dzfrias/gsearch.nvim",
requires = { { "nvim-telescope/telescope.nvim", tag = "0.1.0" } },
}
To use the lua api, run:
require("gsearch").search()
There is also a vim command, Gsearch
, so you can alternatively run :Gsearch
to achieve the same thing as the option above.
You can also pass in Telescope options to the search
command.
Below are the default options for the setup function.
require("gsearch").setup {
-- Set to false to disable the plugin
enabled = true,
-- Whether to include what's in your Telescope prompt in the list of
-- suggestions
raw_included = true,
-- The key to use to Google search for what's in your Telescope prompt
-- without using one of the suggestions. Note that the <s-CR> keybinding may
-- not work on all terminals/operating systems.
open_raw_key = "<s-CR>",
-- The shell command to use to open the URL. As an empty string, it
-- defaults to your OS defaults ("open" for macOS, "xdg-open" for Linux)
open_cmd = "",
}
No default mappings are provided.
This plugin is licensed under the MIT license.