0

I am using this, and I think I have some odd behavior. I open a repl at the project root (foons), open a file (ex.clj) file with vim in the project, and then eval the following (both with <,>Eval and cpp inside the form) :

(clojure.core/in-ns 'foons.ex)

When I do this, it seems that the whole file gets evaluated, not just the form I select, which I think is incorrect.

However, if I change to foons.ex namespace in the repl I launched, and do the same in-ns command inside of Vim, I get the expected behavior, and just the form evaluates, not the whole file.

Is this a bug, or do I possibly have something configured wrong?

Specs:

Leiningen 2.9.1 on Java 13.0.1 Java HotSpot(TM) 64-Bit Server VM

Clojure: 1.10.0

nrepl: 0.6.0

I also opened bug here: https://github.com/tpope/vim-fireplace/issues/373

Community
  • 1
  • 1
mpettis
  • 3,222
  • 4
  • 28
  • 35
  • Just as a side-note: wasn't `Eval` dropped in fireplace in favour of `Clj(s)Eval`? I am not saying, that this is realted, but it could indicate, that you are using an old fireplace version? – cfrick Jan 18 '20 at 20:13
  • The latests build seems to be Dec. 15, 2019, and there is no mention there of deprecation. I would think Clj(s)Eval is for Clojurescript, not main Clojure... but thanks. – mpettis Jan 18 '20 at 20:19
  • 1
    `CljEval` is not for cljs, `CljsEval` is - but that release seems recent anyway. just wanted to check – cfrick Jan 18 '20 at 20:21

1 Answers1

1

This question was answered in the github issue I filed here: https://github.com/tpope/vim-fireplace/issues/373

To summarize the answer, it is behaving as designed. From the issue:

If I understand correctly it is working as intended. Fireplace's :Eval always happens inside the current file's namespace, which means we need to require it beforehand if it isn't already defined.

mpettis
  • 3,222
  • 4
  • 28
  • 35