From 8910ad1a0d6760fb951055f74d0ab5d34aa959d2 Mon Sep 17 00:00:00 2001 From: Willem Jan Noort Date: Mon, 24 Jun 2024 22:44:05 +0200 Subject: [PATCH] chore(docs): expand readme --- README.md | 53 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7c6b8b8..a3a550f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The plugin provides an opinionated workflow to interact with Azure DevOps Pull R ## Installation - Requires Neovim >= 0.10 -- Installation: +- Installation using lazy: ``` lua { "Willem-J-an/adopure.nvim", @@ -18,6 +18,13 @@ The plugin provides an opinionated workflow to interact with Azure DevOps Pull R end, } ``` +- Available on luarocks: +``` +luarocks install adopure.nvim +``` + +For all available config options see: +:h adopure.config.meta ## Usage ``` @@ -27,16 +34,34 @@ The plugin provides an opinionated workflow to interact with Azure DevOps Pull R ``` command | subcommand | description --- | -- | -- -load | " " | Loads specified argument into state. -" " | context | Load open pull requests; prompt user to pick one. -" " | threads | Fetch comment threads from Azure DevOps. -open | " " | Opens specified argument in the editor. -" " | quickfix | Open comment threads in quickfix window. -" " | thread_picker | Open a picker with all comment threads. -" " | new_thread | Opens a window to write a comment on code selection. -" " | existing_thread | Opens a window with an existing comment thread. -submit | " " | Submits specified argument to Azure DevOps. -" " | comment | Submit new comment or reply; must be in new_thread or existing_thread window. -" " | vote | Submit a new vote on the pull request. -" " | thread_status | Submit a thread_status change; must be in existing_thread window. +-- | -- | -- +load | | Loads specified argument into state. + | context | Load open pull requests; prompt user to pick one. + | threads | Fetch comment threads from Azure DevOps. +open | | Opens specified argument in the editor. + | quickfix | Open comment threads in quickfix window. + | thread_picker | Open a picker with all comment threads. + | new_thread | Opens a window to write a comment on code selection. + | existing_thread | Opens a window with an existing comment thread. +submit | | Submits specified argument to Azure DevOps. + | comment | Submit new comment or reply; must be in new_thread or existing_thread window. + | vote | Submit a new vote on the pull request. + | thread_status | Submit a thread_status change; must be in existing_thread window. + +## Suggested keymaps +``` lua +local function set_keymap(keymap, command) + vim.keymap.set({ "n", "v" }, keymap, function() + vim.cmd(":" .. command) + end, { desc = command }) +end +set_keymap("alc", "AdoPure load context") +set_keymap("alt", "AdoPure load threads") +set_keymap("aoq", "AdoPure open quickfix") +set_keymap("aot", "AdoPure open thread_picker") +set_keymap("aon", "AdoPure open new_thread") +set_keymap("aoe", "AdoPure open existing_thread") +set_keymap("asc", "AdoPure submit comment") +set_keymap("asv", "AdoPure submit vote") +set_keymap("ast", "AdoPure submit thread_status") +```