Skip to content

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

License

Notifications You must be signed in to change notification settings

Aliqyan-21/wit.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 

Repository files navigation

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

witcomp.mp4

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

perplexity

Installation

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

Using packer.nvim:

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

Using lazy.nvim:

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.

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://<your_preferred_search_engine>/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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages