Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajaymamtora committed Sep 22, 2024
1 parent c962495 commit 9f5b15a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ There are keymaps available to accept or reject edits from the LLM in the [inlin

<!-- panvimdoc-ignore-end -->

Run `:CodeCompanionActions` to open the action palette, which gives you access to all of the functionality in the plugin. This is where core actions and the [pre-defined prompts](#clipboard-pre-defined-prompts) are listed.
Run `:CodeCompanionActions` or `:CodeCompanionTelescope` to open the action palette, which gives you access to all of the functionality in the plugin. This is where core actions and the [pre-defined prompts](#clipboard-pre-defined-prompts) are listed.

> [!NOTE]
> Some actions and prompts will only be visible if you're in _Visual mode_.
Expand All @@ -207,6 +207,7 @@ Below is a list of all commands in the plugin:
- `CodeCompanionChat <adapter>` - Open a chat buffer with a specific adapter
- `CodeCompanionToggle` - Toggle a chat buffer
- `CodeCompanionActions` - Open the _Action Palette_
- `CodeCompanionTelescope` - Open the _Action Palette in telescope_
- `CodeCompanionAdd` - Add visually selected chat to the current chat buffer

**Suggested workflow**
Expand All @@ -216,6 +217,8 @@ For an optimum workflow, I recommend the following keymaps:
```lua
vim.api.nvim_set_keymap("n", "<C-a>", "<cmd>CodeCompanionActions<cr>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<C-a>", "<cmd>CodeCompanionActions<cr>", { noremap = true, silent = true })
-- or vim.api.nvim_set_keymap("n", "<C-a>", "<cmd>CodeCompanionTelescope<cr>", { noremap = true, silent = true })
-- or vim.api.nvim_set_keymap("v", "<C-a>", "<cmd>CodeCompanionTelescope<cr>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<LocalLeader>a", "<cmd>CodeCompanionToggle<cr>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<LocalLeader>a", "<cmd>CodeCompanionToggle<cr>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "ga", "<cmd>CodeCompanionAdd<cr>", { noremap = true, silent = true })
Expand Down
2 changes: 1 addition & 1 deletion doc/RECIPES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require("codecompanion").setup({
})
```

In this example, if you run `:CodeCompanionActions`, you should see "My New Prompt" in the bottom of the _Prompts_ section of the palette. Clicking on your new action will initiate the _chat_ strategy and set the value of the chat buffer based on the _role_ and _content_ that's been specified in the prompt.
In this example, if you run `:CodeCompanionActions` or `:CodeCompanionTelescope`, you should see "My New Prompt" in the bottom of the _Prompts_ section of the palette. Clicking on your new action will initiate the _chat_ strategy and set the value of the chat buffer based on the _role_ and _content_ that's been specified in the prompt.

In the following sections, we'll explore how you can customise your prompts even more.

Expand Down
3 changes: 2 additions & 1 deletion doc/codecompanion.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ There are keymaps available to accept or reject edits from the LLM in the

**Action Palette**

Run `:CodeCompanionActions` to open the action palette, which gives you access
Run `:CodeCompanionActions` or `:CodeCompanionTelescope` to open the action palette, which gives you access
to all of the functionality in the plugin. This is where core actions and the
|codecompanion-pre-defined-prompts| are listed.

Expand All @@ -187,6 +187,7 @@ For an optimum workflow, I recommend the following keymaps:

>lua
vim.api.nvim_set_keymap("n", "<C-a>", "<cmd>CodeCompanionActions<cr>", { noremap = true, silent = true })
-- or: vim.api.nvim_set_keymap("n", "<C-a>", "<cmd>CodeCompanionTelescope<cr>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<C-a>", "<cmd>CodeCompanionActions<cr>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<LocalLeader>a", "<cmd>CodeCompanionToggle<cr>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<LocalLeader>a", "<cmd>CodeCompanionToggle<cr>", { noremap = true, silent = true })
Expand Down

0 comments on commit 9f5b15a

Please sign in to comment.