Skip to content
Discussion options

You must be logged in to vote

I asked Claude to lay out my solution in a straightforward, step-by-step manner, so this should be pretty easy to follow. Let me know if you need any extra help.
It isn't documented because there's no option — the behaviour is hard-coded — but you can get it from config alone, without wrapping vim.ui.input.

1. Why the cursor is at the end. lua/snacks/input.lua finishes with

vim.api.nvim_win_call(win.win, function()
  vim.cmd("startinsert!")
end)

The ! is the A form — insert at end of line. Nothing there reads a config key, which is why you found nothing in the docs.

2. on_win alone is too early. snacks.win invokes opts.on_win from inside M:show(), and show() runs during Snacks.win(opts.win)

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@poperigby
Comment options

@drowning-cat
Comment options

@kaminagakur4
Comment options

Answer selected by poperigby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants