http-codes.nvim/plugin/http-codes.lua
Barrett Ruth 13b1f756c8 feat: add <Plug> mappings
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.
2026-02-07 14:00:00 -05:00

10 lines
300 B
Lua

if vim.g.loaded_http_codes then
return
end
vim.g.loaded_http_codes = 1
vim.api.nvim_create_user_command('HTTPCodes', function()
require('http-codes').pick()
end, {})
vim.keymap.set('n', '<Plug>(http-codes-pick)', function() require('http-codes').pick() end, { desc = 'Pick HTTP status code' })