Fork me on GitHub
#vim
<
2021-02-22
>
orestis13:02:17

I've done some more deep digging in the external UI functionality of neovim. Unfortunately a lot of my ideas are not really implementable because you lack semantic information about a window (e.g. is this a Conjure REPL window? Is this a fugitive window?). So all the UIs can do for now is just add some visual niceties like shadows. NeoVim will still draw the status lines and vertical separators as text (though I think it's planned to externalise that too at some point).

Olical13:02:11

Oh interesting! :thinking_face: I identify it by the name of the buffer personally, but I could totally add a buffer local variable that identified Conjure buffers? Not sure how you'd identify which window it was though...

Olical13:02:20

Ohhh there is a w: prefix... I could do b:conjure#log = v:true and w:conjure#log = v:true as well as w:conjure#log#hud = v:true or something like that so you can distinguish. If that helps?

juhoteperi13:02:14

Many plugins set buffer filetype to a custom value, like filetype=fugitiveblame (vim-iced though seems to use just clojure for repl buffer)

Olical13:02:58

I think you can use dotted filetypes too, so I could set the filetype to clojure.conjure :thinking_face: I think that layers in the different filetype plugins? Something I learned about recently and don't fully understand.

Olical13:02:22

I think setting buffer/window local flags is a decent identifier too though.

orestis14:02:05

Perhaps that's something I need to look into, I was so far focusing on the notification events that you receive, which just send you window handles (in multigrid mode). But still, the global layout is dictated by neovim and you can't even draw your own separators or status lines, neovim draws those with text characters 😕

orestis14:02:38

If anyone is curious, here's the tracking issue for all the external UI stuff: https://github.com/neovim/neovim/issues/9421