Skip to content

Commit

Permalink
⚡ Add --unstable-kv flag to docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
yukimemi committed Jan 25, 2024
1 parent 2b0f9ec commit feda083
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 45 deletions.
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,33 @@ This plugin is a Google gemini chat for Vim / Neovim.

If you use [folke/lazy.nvim](https://github.com/folke/lazy.nvim).

```lua
```lua
{
"yukimemi/futago.vim",
lazy = false,
dependencies = {
"vim-denops/denops.vim",
},
}
```

}
```

If you use [yukimemi/dvpm](https://github.com/yukimemi/dvpm).

```typescript
dvpm.add({ url: "yukimemi/futago.vim" });
```

```typescript
dvpm.add({ url: "yukimemi/futago.vim" });
```

# Requirements

- [Deno - A modern runtime for JavaScript and TypeScript](https://deno.land/)
- [vim-denops/denops.vim: 🐜 An ecosystem of Vim/Neovim which allows developers to write cross-platform plugins in Deno](https://github.com/vim-denops/denops.vim)
Using Deno.KV, you need the `--unstable-kv` flag.
Please specify as below.

```vim
let g:denops#server#deno_args = ['-q', '--no-lock', '--unstable-kv', '-A']
```

- Environment: `GEMINI_API_KEY`
[Get API key](https://ai.google.dev/)

Expand Down Expand Up @@ -107,7 +114,7 @@ example:

# Example

```vim
```vim
let g:futago_debug = v:true
let g:futago_chat_path = '~/.cache/vim/futago/chat'
let g:futago_log_file = '~/.cache/vim/futago/log/futago.log'
Expand All @@ -123,9 +130,9 @@ let g:futago_generation_config = {
\ "maxOutputTokens": 256,
\ }
nnoremap <Leader>Fc <Cmd>call futago#start_chat("vsplit", [{"role": "user", "parts": "僕の名前は yukimemi"}, {"role": "model", "parts": "了解!覚えておくね"}])<cr>
```

nnoremap <Leader>Fc <Cmd>call futago#start_chat("vsplit", [{"role": "user", "parts": "僕の名前は yukimemi"}, {"role": "model", "parts": "了解!覚えておくね"}])<cr>
```

# License

Licensed under MIT License.
Expand Down
73 changes: 40 additions & 33 deletions doc/futago.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,35 @@ Installation ~

If you use folke/lazy.nvim |https://github.com/folke/lazy.nvim|.

>
{
"yukimemi/futago.vim",
lazy = false,
dependencies = {
"vim-denops/denops.vim",
},
}
<

>
{
"yukimemi/futago.vim",
lazy = false,
dependencies = {
"vim-denops/denops.vim",
},
}
<

If you use yukimemi/dvpm |https://github.com/yukimemi/dvpm|.

>
dvpm.add({ url: "yukimemi/futago.vim" });
<

>
dvpm.add({ url: "yukimemi/futago.vim" });
<

=============================================================================
Requirements ~
*futago-requirements*

- [Deno - A modern runtime for JavaScript and TypeScript](https://deno.land/)
- [vim-denops/denops.vim: 🐜 An ecosystem of Vim/Neovim which allows developers to write cross-platform plugins in Deno](https://github.com/vim-denops/denops.vim)
Using Deno.KV, you need the `--unstable-kv` flag.
Please specify as below.

>
let g:denops#server#deno_args = ['-q', '--no-lock', '--unstable-kv', '-A']
<

- Environment: `GEMINI_API_KEY`
[Get API key](https://ai.google.dev/)

Expand Down Expand Up @@ -125,25 +132,25 @@ example:
Example ~
*futago-example*

>
let g:futago_debug = v:true
let g:futago_chat_path = '~/.cache/vim/futago/chat'
let g:futago_log_file = '~/.cache/vim/futago/log/futago.log'
let g:futago_history_db = '~/.cache/vim/futago/db/history.db'
let g:futago_safety_settings = [
\ { "category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_NONE" },
\ { "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_NONE" },
\ { "category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_ONLY_HIGH" },
\ { "category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE" },
\ ]
let g:futago_generation_config = {
\ "temperature": 0.9,
\ "maxOutputTokens": 256,
\ }
nnoremap <Leader>Fc <Cmd>call futago#start_chat("vsplit", [{"role": "user", "parts": "僕の名前は yukimemi"}, {"role": "model", "parts": "了解!覚えておくね"}])<cr>
<

>
let g:futago_debug = v:true
let g:futago_chat_path = '~/.cache/vim/futago/chat'
let g:futago_log_file = '~/.cache/vim/futago/log/futago.log'
let g:futago_history_db = '~/.cache/vim/futago/db/history.db'
let g:futago_safety_settings = [
\ { "category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_NONE" },
\ { "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_NONE" },
\ { "category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_ONLY_HIGH" },
\ { "category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE" },
\ ]
let g:futago_generation_config = {
\ "temperature": 0.9,
\ "maxOutputTokens": 256,
\ }
nnoremap <Leader>Fc <Cmd>call futago#start_chat("vsplit", [{"role": "user", "parts": "僕の名前は yukimemi"}, {"role": "model", "parts": "了解!覚えておくね"}])<cr>
<

=============================================================================
License ~
*futago-license*
Expand Down
9 changes: 9 additions & 0 deletions pod/futago.pod
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ dvpm.add({ url: "yukimemi/futago.vim" });

=item [vim-denops/denops.vim: 🐜 An ecosystem of Vim/Neovim which allows developers to write cross-platform plugins in Deno](https://github.com/vim-denops/denops.vim)

Using Deno.KV, you need the `--unstable-kv` flag.
Please specify as below.

=begin vim

let g:denops#server#deno_args = ['-q', '--no-lock', '--unstable-kv', '-A']

=end vim

=item Environment: `GEMINI_API_KEY`

[Get API key](https://ai.google.dev/)
Expand Down

0 comments on commit feda083

Please sign in to comment.