1if vim.g.loaded_ai_complete == 1 then
2 return
3end
4
5vim.g.loaded_ai_complete = 1
6
7vim.api.nvim_create_user_command('Ai', function(opts)
8 require('ai_complete').dispatch(opts)
9end, {
10 nargs = '*',
11 range = true,
12})
13
14vim.api.nvim_create_user_command('AiComplete', function()
15 require('ai_complete').complete_at_cursor()
16end, { desc = 'AI completion at cursor' })