summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--plugin/vim-ai.vim10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugin/vim-ai.vim b/plugin/vim-ai.vim
index 0e4957f..1ed5326 100644
--- a/plugin/vim-ai.vim
+++ b/plugin/vim-ai.vim
@@ -12,11 +12,11 @@ augroup vim_ai
\ let g:vim_ai_is_selection_pending = mode() =~# "^[vV\<C-v>]"
augroup END
-command! -range -nargs=? AI <line1>,<line2>call vim_ai#AIRun({}, <q-args>)
-command! -range -nargs=? AIEdit <line1>,<line2>call vim_ai#AIEditRun({}, <q-args>)
+command! -range -nargs=? -complete=customlist,vim_ai#RoleCompletion AI <line1>,<line2>call vim_ai#AIRun({}, <q-args>)
+command! -range -nargs=? -complete=customlist,vim_ai#RoleCompletion AIEdit <line1>,<line2>call vim_ai#AIEditRun({}, <q-args>)
" Whereas AI and AIEdit default to passing the current line as range
" AIChat defaults to passing nothing which is achieved by -range=0 and passing
" <count> as described at https://stackoverflow.com/a/20133772
-command! -range=0 -nargs=? AIChat <line1>,<line2>call vim_ai#AIChatRun(<count>, {}, <q-args>)
-command! -nargs=? AINewChat call vim_ai#AINewChatRun(<f-args>)
-command! AIRedo call vim_ai#AIRedoRun()
+command! -range=0 -nargs=? -complete=customlist,vim_ai#RoleCompletion AIChat <line1>,<line2>call vim_ai#AIChatRun(<count>, {}, <q-args>)
+command! -nargs=? AINewChat call vim_ai#AINewChatRun(<f-args>)
+command! AIRedo call vim_ai#AIRedoRun()