Fork me on GitHub
#conjure
<
2022-05-20
>
Fredrik Andersson07:05:04

Hi, since a while ago I experience a problem with the HUD. I get a Lua exception

E5108: Error executing lua ...e/fredrik/.cache/vim/plugged/conjure/lua/conjure/log.lua:174: Expected Lua number
stack traceback:
        [C]: in function 'win_is_valid'
        ...e/fredrik/.cache/vim/plugged/conjure/lua/conjure/log.lua:174: in function 'display_hud'
        ...e/fredrik/.cache/vim/plugged/conjure/lua/conjure/log.lua:334: in function 'display_request'
        .../fredrik/.cache/vim/plugged/conjure/lua/conjure/eval.lua:120: in function <.../fredrik/.cache/vim/plugged/conjure/lua/conjure/eval.lua:115>
        .../fredrik/.cache/vim/plugged/conjure/lua/conjure/eval.lua:143: in function 'eval_str'
        .../fredrik/.cache/vim/plugged/conjure/lua/conjure/eval.lua:176: in function 'current-form'
        [string ":lua"]:1: in main chunk
I have tried to figure out what the problem is. But I really don't have any experience of Lua or Vim plugin programming. Is there anyone who could tell me what I should do to get the HUD working again?

Olical08:05:04

Could you try deleting the conjure install and redownloading it. Just in case it's not updating properly?

Olical08:05:13

Also, which version of Neovim are you using?

Olical08:05:28

And are you using impatient to cache your Lua?

Fredrik Andersson08:05:06

NVIM v0.7.0 Build type: Release LuaJIT 2.1.0-beta3

Fredrik Andersson08:05:44

ill try and delete Conjure installation

Fredrik Andersson08:05:49

i dont use impatient

Fredrik Andersson08:05:15

I tried to delete my plugins and reinstalled them

Fredrik Andersson08:05:22

still the same error

Olical08:05:58

Hmm. This was a bug I fixed a while back which was caused by a breaking change in Neovim, not caused by Conjure. So I added code to handle 0.6 and 0.7. I actually caught a colleague running into this yesterday and got them to update and it was fine after that.

Olical08:05:29

They actually had a second copy of conjure (an old one) under their Neovim pack start directory. That was stepping in and loading before the up to date version.

Fredrik Andersson08:05:41

ok, ill check what version of the repo i have

Olical08:05:05

That was 12 August 2020! :O

Fredrik Andersson08:05:53

why am i getting this with plugged then?

Olical08:05:57

Yeah that definitely won't be compatible with Neovim 0.7+ because of the breaking changes.

Olical08:05:28

I would guess because there's a rogue old copy of conjure somewhere in your path that's loading first, like my colleague

Olical08:05:33

Maybe one manually cloned

Olical08:05:46

Or plugged is configured to fetch that version for some reason

Olical08:05:50

With a tag maybe?

Fredrik Andersson08:05:59

sorry i messed up

Olical08:05:22

Computers are hard, it's no problem :D I hope it's fixed!

Fredrik Andersson08:05:33

now it works 🙂

Olical08:05:41

Yay! What was it in the end? Just a pinned version or something?

Fredrik Andersson10:05:13

Yes that was it :man-facepalming:

Proctor20:05:35

Has anybody done any “emacs lisp” style scratch buffer setup? Was thinking of doing a keymapping to open a Lisp Scratch Buffer, or something like that… Maybe just straight Fennel as the language type to start with…

nbardiuk20:05:21

not exactly lisp scratch buffer, I have a command to create scratch buffer with specified suffix, it creates a temporary file with the suffix in neovim temporary folder. I can call :Scratch .fnl or :Scratch .clj to have a buffer with lisp https://github.com/nbardiuk/dotfiles/blob/fc61451baa1df5d03d2e59c1dd3b5151915b760d/nix/.config/nixpkgs/home/init.fnl#L694-L699

dave01:05:44

I have something similar, but as a shell function that generates a random temp filename and opens it in Vim. Not exactly the same, but similar idea