From f73b613a33116306dd5bb8b9ee29519e4f11f244 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Tue, 3 Feb 2026 22:33:05 -0500 Subject: [PATCH 1/2] docs: modernize readme, move config to vimdoc --- README.md | 29 +++-------------------------- doc/http-codes.txt | 43 +++++++++++++++++++++++-------------------- 2 files changed, 26 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 6717a08..6cd3594 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ # http-codes.nvim -Quickly investigate HTTP status codes with the help of [Mozilla](https://developer.mozilla.org/en-US/docs/Web/HTTP), with telescope, fzf-lua, and snacks.nvim integrations. +Quickly investigate HTTP status codes with [Mozilla](https://developer.mozilla.org/en-US/docs/Web/HTTP), with telescope, fzf-lua, and snacks.nvim integrations. ## Installation -Install using your package manager of choice or via [luarocks](https://luarocks.org/modules/barrettruth/http-codes.nvim): +Install with your package manager or via +[luarocks](https://luarocks.org/modules/barrettruth/http-codes.nvim): ``` luarocks install http-codes.nvim @@ -13,34 +14,10 @@ luarocks install http-codes.nvim ## Dependencies One of: - - [fzf-lua](https://github.com/ibhagwan/fzf-lua) - [snacks.nvim](https://github.com/folke/snacks.nvim) - [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) -## Configuration - -Configure via `vim.g.http_codes` before the plugin loads: - -```lua -vim.g.http_codes = { - use = 'fzf-lua', -- or 'snacks' or 'telescope', auto-detected by default - open_url = 'xdg-open %s', -- OS-specific by default -} -``` - -| OS | Default open_url | -| ------- | ---------------- | -| Windows | `start %s` | -| macOS | `open %s` | -| Linux | `xdg-open %s` | - -## Usage - -```vim -:HTTPCodes -``` - ## Documentation ```vim diff --git a/doc/http-codes.txt b/doc/http-codes.txt index 6b2294e..a348eb2 100644 --- a/doc/http-codes.txt +++ b/doc/http-codes.txt @@ -1,39 +1,42 @@ -http-codes *http-codes.txt* +*http-codes* *http-codes.txt* Author: Barrett Ruth -Homepage: +Homepage: =============================================================================== INTRODUCTION *http-codes.nvim* -http-codes.nvim lets you quickly investigate HTTP status codes with Mozilla, -supporting fzf-lua, snacks.nvim, and telescope.nvim. +http-codes.nvim lets you quickly investigate HTTP status codes using Mozilla +documentation, with telescope, fzf-lua, and snacks.nvim integrations. =============================================================================== -CONFIGURATION *http-codes.config* +USAGE *:HTTPCodes* + +>vim + :HTTPCodes +< + +=============================================================================== +CONFIGURATION *vim.g.http_codes* + +Configure via `vim.g.http_codes`: -Configure via `vim.g.http_codes` before the plugin loads: >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', } < -Options: ~ - - {use} `(string|nil)`: Picker to use: 'fzf-lua', 'snacks', or - 'telescope'. Auto-detected if not specified. - {open_url} `(string|nil)`: Command to open URLs. Uses `%s` as placeholder. - Defaults based on OS: - - Linux: 'xdg-open %s' - - macOS: 'open %s' - - Windows: 'start %s' - -=============================================================================== -COMMANDS *http-codes.commands* +Default `open_url` by operating system: -:HTTPCodes Browse HTTP codes using the configured picker. + OS Default + -------- --------------- + Windows start %s + macOS open %s + Linux xdg-open %s ------------------------------------------------------------------------------- -vim:tw=80:ft=help: +vim:tw=80:ts=8:ft=help: From 7d5f4a9a828d270e6ec24796d3bceff1dd34e097 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Tue, 3 Feb 2026 22:50:36 -0500 Subject: [PATCH 2/2] fix(pre-commit): run all files --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6cd3594..a0142cf 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ luarocks install http-codes.nvim ## Dependencies One of: + - [fzf-lua](https://github.com/ibhagwan/fzf-lua) - [snacks.nvim](https://github.com/folke/snacks.nvim) - [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)