Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[suggestion]: automatically enter insert mode for neoai-prompt (when running :NeoAI) #48

Open
bcp-dev-ops opened this issue Aug 5, 2023 · 1 comment

Comments

@bcp-dev-ops
Copy link

This would be a huge ergonomic improvement.

Been struggling this morning trying to write an autocommand that enters in insert mode on BufEnter for neoai-prompt buffers; however, have not been fruitful. It seems like there is something async happening that makes this difficult.

Thanks for your consideration

@joeldrotleff
Copy link

This works for me, define a mapping to open NeoAI and then type 'i' afterwards to enter insert mode:
["<leader>na"] = { ":NeoAI<CR>i", "Smart toggle NeoAI window" },

(I use NVChad)

I think the raw lua to use would be:

vim.api.nvim_set_keymap('n', '<leader>na', ':NeoAI<CR>i', { noremap = true, desc = 'Smart toggle NeoAI window' })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants