Skip to content

Commit

Permalink
chore(docs): expand readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Willem Jan Noort committed Jun 24, 2024
1 parent cb89ec2 commit 8910ad1
Showing 1 changed file with 39 additions and 14 deletions.
53 changes: 39 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
```
Expand All @@ -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 | <i> | Loads specified argument into state.
<i> | context | Load open pull requests; prompt user to pick one.
<i> | threads | Fetch comment threads from Azure DevOps.
open | <i> | Opens specified argument in the editor.
<i> | quickfix | Open comment threads in quickfix window.
<i> | thread_picker | Open a picker with all comment threads.
<i> | new_thread | Opens a window to write a comment on code selection.
<i> | existing_thread | Opens a window with an existing comment thread.
submit | <i> | Submits specified argument to Azure DevOps.
<i> | comment | Submit new comment or reply; must be in new_thread or existing_thread window.
<i> | vote | Submit a new vote on the pull request.
<i> | 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("<leader>alc", "AdoPure load context")
set_keymap("<leader>alt", "AdoPure load threads")
set_keymap("<leader>aoq", "AdoPure open quickfix")
set_keymap("<leader>aot", "AdoPure open thread_picker")
set_keymap("<leader>aon", "AdoPure open new_thread")
set_keymap("<leader>aoe", "AdoPure open existing_thread")
set_keymap("<leader>asc", "AdoPure submit comment")
set_keymap("<leader>asv", "AdoPure submit vote")
set_keymap("<leader>ast", "AdoPure submit thread_status")
```

0 comments on commit 8910ad1

Please sign in to comment.