Fork me on GitHub
#calva
<
2019-10-08
>
nbdam10:10:55

Does anybody use parinfer with calva? I can't get it to work as long as calva is enabled.. (tried disabling calva-fmt and changing options...)

pez11:10:56

@nbdam In what way does it not work?

nbdam13:10:29

Indent mode behaves strange.. eg in following form: (ns x.util-test (:require [x.util :as xu] [clojure.test :refer :all])) - when I press enter after xu], line is correctly added but cursor ends up on start of that new line - when I press enter between last two closing parens, line is added below, and cursor ends up on first colum of original line

pez13:10:22

> - when I press enter after xu], line is correctly added but cursor ends up on start of that new line Yes, Calva disables this in order to predictably be able to place the cursor right, when its auto-indent is enabled. We might be able to make it conditonal. > - when I press enter between last two closing parens, line is added below, and cursor ends up on first colum of original line This is Paredit behavior, regardless of Calva I think.

pez15:10:06

@nbdam: I’ve built a version of Calva that doesn’t move the cursor to the end of the line when Calva is not the auto-indentor. Here: https://964-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.45-full-autoindent-off-5eb6ae6e.vsix So if you install that and have calva.fmt.formatAsYouType off, you should be able to use Calva with Parinfer.

pez15:10:22

Let me know if you try it out and how you fare, please.

nbdam16:10:18

@pez maybe I didn't clearly explain #2 but calva changes behaviour of parinfer. Regardless, your custom build seems to fix both problems for me:grinning:

❤️ 4
pez17:10:29

Thanks for feedback, @nbdam! I’ll cut a new release with that fix.

pez17:10:21

Calva 2.0.45 is out.

pez18:10:16

However, it seems I forgot something important….

pez18:10:54

OK. So now 2.0.46 is out. WITH the Parinfer fix.