Problem: users who want keybindings must call Lua functions directly or wrap commands in closures. There is no stable public API for key binding. Solution: define <Plug> mappings in the plugin file and document them in a new MAPPINGS section in the vimdoc.
53 lines
1.7 KiB
Text
53 lines
1.7 KiB
Text
*http-codes* *http-codes.txt*
|
|
|
|
Author: Barrett Ruth <https://barrettruth.com>
|
|
Homepage: <https://github.com/barrett-ruth/http-codes.nvim>
|
|
|
|
===============================================================================
|
|
INTRODUCTION *http-codes.nvim*
|
|
|
|
http-codes.nvim lets you quickly investigate HTTP status codes using Mozilla
|
|
documentation, with telescope, fzf-lua, and snacks.nvim integrations.
|
|
|
|
===============================================================================
|
|
USAGE *:HTTPCodes*
|
|
|
|
>vim
|
|
:HTTPCodes
|
|
<
|
|
|
|
===============================================================================
|
|
MAPPINGS *http-codes-mappings*
|
|
|
|
*<Plug>(http-codes-pick)*
|
|
<Plug>(http-codes-pick) Open the HTTP status code picker.
|
|
Equivalent to |:HTTPCodes|.
|
|
|
|
Example configuration: >lua
|
|
vim.keymap.set('n', '<leader>hc', '<Plug>(http-codes-pick)')
|
|
<
|
|
|
|
===============================================================================
|
|
CONFIGURATION *vim.g.http_codes*
|
|
|
|
Configure via `vim.g.http_codes`:
|
|
|
|
>lua
|
|
vim.g.http_codes = {
|
|
-- Picker: 'fzf-lua', 'snacks', or 'telescope' (auto-detected)
|
|
use = 'fzf-lua',
|
|
-- Command to open URLs (OS-specific by default)
|
|
open_url = 'xdg-open %s',
|
|
}
|
|
<
|
|
|
|
Default `open_url` by operating system:
|
|
|
|
OS Default
|
|
-------- ---------------
|
|
Windows start %s
|
|
macOS open %s
|
|
Linux xdg-open %s
|
|
|
|
-------------------------------------------------------------------------------
|
|
vim:tw=80:ts=8:ft=help:
|