Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aliqyan-21/wit.nvim

Plugin that allows you to perform web searches directly from within neovim!
https://github.com/aliqyan-21/wit.nvim

neovim neovim-plugin nvim nvim-plugin plugin search web

Last synced: 6 days ago
JSON representation

Plugin that allows you to perform web searches directly from within neovim!

Awesome Lists containing this project

README

        

# wit.nvim

###### `wit.nvim` is a plugin that allows you to perform web searches directly from within Neovim.

Switch, open browser, click on search, search...aah I was tired of this, Now I can web search directly through nvim.

Especially the errors I can just visual select and hit keymap and...voila done!

## Features

- **Search Web Directly**
- **Set your preffered Search Engine**
- **Support for Custom Search Engine URLs**
- **Wikipedia Search Command**
- **Visual Mode Search:** select text or errors to search directly

## Sound On

https://github.com/user-attachments/assets/7e31238e-8b1e-484c-a68b-8604d6b1d971

### AI (perplexity.ai, ...etc.)

![perplexity](https://github.com/user-attachments/assets/45d96f0b-7074-40e9-a7f0-7a9ec117b724)

## Installation

You can install wit.nvim using any plugin manager for example:

Using packer.nvim:

```lua
require('packer').startup(function()
use {
'aliyan-21/wit.nvim',
config = function()
require('wit').setup()
end
}
end)
```

Using lazy.nvim:

```lua
return {
"aliqyan-21/wit.nvim",
config = function()
require('wit').setup()
end
}
```

## Usage

###### Search with Command

To perform a web search, use the `:WitSearch` command followed by your query.

```
:WitSearch your search query
```

To perform a direct wikipedia search, use the `:WitSearchWiki` command followed by your query.

```
:WitSearchWiki your search topic
```

###### Search with Visual Mode

Select the text you want to search and then hit `:WitVisualSearch` and enter.

## Configuration

Configure `wit.nvim` by adding the setup function in your configuration file.

```lua
require("wit").setup({
-- You can choose your preferred search engine from
-- the supported list: {google, bing, duckduckgo, ecosia, brave, perplexity}.
--
-- There's also the possibility of just specifying a custom
-- search engine URL by providing the base URL and the required search params.
-- EXAMPLE:
-- engine = "https:///search?q="
engine = "google", -- search engine (default: "google")

command_search = "WitSearch", -- custom command to search (default: "WitSearch")
command_search_visual = "WitSearchVisual", -- custom command to search visually (default: "WitSearchVisual")
command_search_wiki = "WitSearchWiki", -- custom command to search wikipedia (default: "WitSearchWiki")
})
```

###### You can also specify a custom search engine URL by providing the base URL in the search_engine configuration. Just ensure you include the ?q= at the end.

## Contributing

Feel free to contribute to the development of `wit.nvim` by submitting issues or pull requests.

## License

wit.nvim is licensed under the MIT License.

## Acknowledgements

Special thanks to the Neovim and Neovim community.