Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Mar 18, 2024
1 parent 1999294 commit 0949275
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ require("codecompanion").setup({
})
```

Of course, you may need to modify certain parameters of an adapter. In the example below, we're changing the name of the API key that the OpenAI adapter uses by passing in a table to the `use` method:
Of course, you may need to modify certain parameters of an adapter (please see [here](https://github.com/olimorris/codecompanion.nvim/tree/main/lua/codecompanion/adapters)). In the example below, we're changing the name of the API key that the OpenAI adapter uses by passing in a table to the `use` method:

```lua
require("codecompanion").setup({
Expand All @@ -194,7 +194,7 @@ require("codecompanion").setup({
#### Additional API Key Options

Having API keys in plain text in your shell is not always safe as any application could access them. Thanks to [this PR](https://github.com/olimorris/codecompanion.nvim/pull/24), you can use encrypted files instead:
Having API keys in plain text in your shell is not always safe. Thanks to [this PR](https://github.com/olimorris/codecompanion.nvim/pull/24), you can run commands from within the plugin:

```lua
require("codecompanion").setup({
Expand All @@ -208,6 +208,8 @@ require("codecompanion").setup({
})
```

In this example, we're using `gpg` to decrypt a file to obtain an API key.

### Edgy.nvim Configuration

The author recommends pairing with [edgy.nvim](https://github.com/folke/edgy.nvim) for a Co-Pilot Chat-like experience:
Expand Down
17 changes: 10 additions & 7 deletions doc/codecompanion.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ You can specify an adapter for each of the strategies in the plugin:
})
<

Of course, you may need to modify certain parameters of an adapter. In the
example below, we’re changing the name of the API key that the OpenAI adapter
uses by passing in a table to the `use` method:
Of course, you may need to modify certain parameters of an adapter (please see
here
<https://github.com/olimorris/codecompanion.nvim/tree/main/lua/codecompanion/adapters>).
In the example below, we’re changing the name of the API key that the OpenAI
adapter uses by passing in a table to the `use` method:

>lua
require("codecompanion").setup({
Expand All @@ -173,10 +175,9 @@ uses by passing in a table to the `use` method:

ADDITIONAL API KEY OPTIONS

Having API keys in plain text in your shell is not always safe as any
application could access them. Thanks to this PR
<https://github.com/olimorris/codecompanion.nvim/pull/24>, you can use
encrypted files in the configuration:
Having API keys in plain text in your shell is not always safe. Thanks to this
PR <https://github.com/olimorris/codecompanion.nvim/pull/24>, you can run
commands from within the plugin:

>lua
require("codecompanion").setup({
Expand All @@ -190,6 +191,8 @@ encrypted files in the configuration:
})
<

In this example, we’re using `gpg` to decrypt a file to obtain an API key.


EDGY.NVIM CONFIGURATION ~

Expand Down

0 comments on commit 0949275

Please sign in to comment.