https://github.com/wurli/urlpreview.nvim
URL previews in Neovim 🔗💫
https://github.com/wurli/urlpreview.nvim
lua-plugin neovim neovim-lua neovim-plugin
Last synced: 5 months ago
JSON representation
URL previews in Neovim 🔗💫
- Host: GitHub
- URL: https://github.com/wurli/urlpreview.nvim
- Owner: wurli
- Created: 2025-06-27T15:24:11.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-08-06T19:16:42.000Z (5 months ago)
- Last Synced: 2025-08-06T21:10:45.451Z (5 months ago)
- Topics: lua-plugin, neovim, neovim-lua, neovim-plugin
- Language: Lua
- Homepage:
- Size: 60.5 KB
- Stars: 13
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# urlpreview.nvim
A Neovim plugin to show basic information about webpages in-editor 💫

## Installation
Using Lazy.nvim:
``` lua
{
"wurli/urlpreview.nvim",
opts = {
-- If `true` an autocommand will be created to show a preview when the cursor
-- rests over an URL. Note, this uses the `CursorHold` event which can take a
-- while to trigger if you don't change your `updatetime`, e.g. using
-- `vim.opt.updatetime = 500`.
auto_preview = true,
-- By default no keymap will be set. If set, this keymap will be applied in
-- normal mode and will work when the cursor is over an URL.
keymap = "K",
-- The maximum width to use for the URL preview window.
max_window_width = 100,
-- Highlight groups; use `false` if you don't want highlights.
hl_group_title = "@markup.heading",
hl_group_description = "@markup.quote",
hl_group_url = "Underlined",
-- See `:h nvim_open_win()` for more options
window_border = "none"
}
}
```
## Features
* Lightweight: no external dependencies besides plain old `curl` 💨
* Non-blocking: Neovim continues to work as normal while waiting for the
request to return.
* Intelligent: uses a page's `` for the main heading, then checks in
turn for ``, `` and
`` for the description.
## Usage
Most users should probably just use the normal config as above, but there's also
an API function `require("urlpreview").preview_url()` you can use for your own
Lua stuff 💥