I'm planning to write a simple pop-up for myself and I found a nice beginning point for this in this question, but I want to make the code compatible with nvim as well. I can't seem to find a similar "intro" for nvim and I'm also hoping that there's code out there that abstracts this away for me (i.e handling vim and nvim). Could someone point me to resources?
Beware that Vim popup is "modal". It can have a border and other stuff while omitting normal editing capabilities. That makes it to behave much like "a popup menu" and not a regular window. While in Neovim it's "normal floating window" that can edit the text but has no builtin support for "menu mode". So there's a big difference in design.
I'm planning to write a simple pop-up for myself
I did that for my personal config some time ago. The trick is to create two floatwins - one for border and another one for displaying "menu items". Then set
:h 'nomodifiable', add a few buffer-local keymaps and all that usual stuff that plugins do to customize "special buffers".
The code is right here. It's working, but it's neither clean nor complete. So I consider rewriting it from scratch... some day. Well, you were warned.
The API deliberately follows one of Vim, except for some unimplemented features.