Olical / conjure

Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile, Python and more!)
https://conjure.fun
The Unlicense
1.7k stars 110 forks source link

Fennel + love2d + VISUAL eval silently stops eval working #243

Closed EdwardIII closed 2 years ago

EdwardIII commented 2 years ago

Hey, thanks for putting together such a great project! Not sure if this is to do with Conjure, love2d, configuration problem, or something I've done, but thought I'd start with Conjure.

I've put together a reproducible test case here: https://github.com/EdwardIII/reproduce-fnl-conjure

If I evaluate the outer expression (<leader>ee) on each expression after a fresh start from (local state...:

https://github.com/EdwardIII/reproduce-fnl-conjure/blob/main/game.fnl#L6

downwards, it works great:

; Sponsored by @rgm ❤
; --------------------------------------------------------------------------------
; "love ." (started)
; --------------------------------------------------------------------------------
; eval (current-form): (local state {:started 0})
nil
; --------------------------------------------------------------------------------
; eval (current-form): (fn duration [start end] (- end start))
#<function: 0x10e11778>
; --------------------------------------------------------------------------------
; eval (current-form): (fn now [] (love.timer.getTime))
#<function: 0x10de53c0>
; --------------------------------------------------------------------------------
; eval (current-form): (now)
18330.517284708

But if I select the same text with VISUAL, evaluate it with <leader>E, I no longer get the eval return output:

; Sponsored by @rgm ❤
; <snip>
; eval (selection): (local state {:started 0}) (fn duration [start end] (- end start)) (fn now [] (love.timer.getT.
nil

And any future attempts to eval behave the same, e.g. if I go to down (now) and hit <leader>ee, I get no more output:

; --------------------------------------------------------------------------------
; eval (current-form): (now)
; --------------------------------------------------------------------------------
; eval (current-form): (now)

Conjure settings in .vimrc:

Plug 'Olical/conjure', {'tag': 'v4.22.1'}
let g:conjure#filetype#fennel = "conjure.client.fennel.stdio"
let g:conjure#client#fennel#stdio#command = "love ."

Version:

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

On MacOS Big Sur 11.4 (20F71)

EdwardIII commented 2 years ago

Possibly on further investigation I think the problem might be with the repl rather than Conjure, as when I try to paste in more than a few lines I see similar behaviour (https://gist.github.com/EdwardIII/130b1ab9926b584dae0544eae19acbf6) so asking around.

EdwardIII commented 2 years ago

Yep pretty sure it's interactions with the repl rather than Conjure, so closing this and linking to the new issue:

https://gitlab.com/alexjgriffith/min-love2d-fennel/-/issues/6