Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nvim-telescope/telescope-arecibo.nvim
A Neovim Telescope extension for searching the web!
https://github.com/nvim-telescope/telescope-arecibo.nvim
Last synced: about 2 months ago
JSON representation
A Neovim Telescope extension for searching the web!
- Host: GitHub
- URL: https://github.com/nvim-telescope/telescope-arecibo.nvim
- Owner: nvim-telescope
- Created: 2021-02-17T18:18:45.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-05-12T09:57:06.000Z (over 3 years ago)
- Last Synced: 2024-06-17T17:12:52.845Z (3 months ago)
- Language: Lua
- Size: 54.7 KB
- Stars: 90
- Watchers: 5
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# telescope-arecibo.nvim
A Neovim Telescope extension for searching the web!![arecibo](https://user-images.githubusercontent.com/1448118/112658122-63a32c80-8e53-11eb-9797-71eb6176493e.gif)
Arecibo is a customizable plugin that can return web search results in your editor.
It ships with selectable 'engines' - which are simply [TreeSitter](https://github.com/nvim-treesitter/nvim-treesitter) queries that are performed againt the retrived HTML document.
The following engines are currently supported:
- DuckDuckGo
- NPMjsTODO: guide for creating new engines.
### Installation
#### Packer.nvim
Arecibo requires the [openssl](https://luarocks.org/modules/zhaozg/openssl) and [lua-http-parser](https://luarocks.org/modules/brimworks/lua-http-parser) lua rocks to be installed in order to retrieve HTTP results.
```
use {
"nvim-telescope/telescope-arecibo.nvim",
rocks = {"openssl", "lua-http-parser"}
}
```Ensure that the TreeSitter HTML grammar is installed.
```
:TSInstall html
```TODO: add manual rocks installation guide
### Telescope Config
Loading the extension:
```
telescope.load_extension("arecibo")
```Extension options:
```
extensions = {
arecibo = {
["selected_engine"] = 'google',
["url_open_command"] = 'xdg-open',
["show_http_headers"] = false,
["show_domain_icons"] = false,
},
}
```* NOTE: Previewer currently depends on `elinks` being installed and probably only works on linux.
### Keymaps
```
require("telescope").extensions.arecibo.websearch()
````` (in finder) resets search
### Highlight groups:
- Result Index : `TelescopeAreciboNumber`
- Result URL : `TelescopeAreciboUrl`
- Result Mode Prompt : `TelescopePromptPrefix`
- Query Mode Prompt : `TelescopeAreciboPrompt`