summaryrefslogtreecommitdiff
path: root/doc/vim-ai.txt
diff options
context:
space:
mode:
authorMartin Bielik <mx.bielik@gmail.com>2024-03-24 11:29:43 +0100
committerGitHub <noreply@github.com>2024-03-24 11:29:43 +0100
commitedd54923c2caa81066e637da50f76905bb1c3a11 (patch)
tree160568ea3abdabbca1273acb9bc423cfa98f1a53 /doc/vim-ai.txt
parenteb333e39e17d4d5240dbbc186a65bc6e9ab6b44e (diff)
parent6a053767af08d6edfb46b4be72f05a9b3bc7be04 (diff)
downloadvim-ai-edd54923c2caa81066e637da50f76905bb1c3a11.tar.gz
Merge pull request #85 from madox2/custom-roles
Custom roles
Diffstat (limited to '')
-rw-r--r--doc/vim-ai.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/vim-ai.txt b/doc/vim-ai.txt
index 72535b3..c7aefde 100644
--- a/doc/vim-ai.txt
+++ b/doc/vim-ai.txt
@@ -161,6 +161,27 @@ You can also customize the options in the chat header: >
generate a paragraph of lorem ipsum
...
+ROLES
+
+Roles are defined in the `.ini` file: >
+
+ let g:vim_ai_roles_config_file = '/path/to/my/roles.ini'
+
+Example of a role: >
+
+ [grammar]
+ prompt = fix spelling and grammar
+
+ [grammar.options]
+ temperature = 0.4
+
+See roles-example.ini for more examples.
+
+The roles in g:vim_ai_roles_config_file are converted to a Vim dictionary whose
+labels are the names of the roles. Optionally, roles can be added by setting
+g:vim_ai_roles_config_function to the name of a Vimscript function returning a
+dictionary of the same format as g:vim_ai_roles_config_file.
+
KEY BINDINGS
Examples how configure key bindings and customize commands: >