Fork me on GitHub

@borkdude: In working with that parser bug (which I think I have figured out now), one of my test texts puzzle me a bit. This:

  #foo :bar
  (foo #foo ('foo^' :bar))
  #_ 'abc 
  #foo  @~#(foo :bar) \space
  \' {:foo (#foo '[1 2 3])} 'abc
     #{:foo (#foo '[1 2 3])}
  \a [] "a"

Here, Calva's parser thinks the (comment ...) form is fine, but clj-kondo complains about the opening paren not being matched. Which judgment is correct?


can you make a smaller repro out of this which fails in clj-kondo but succeeds with JVM clojure?


Trying that shows me that it is Calva that is ”wrong”: This is the minimum repro:

(comment ^)
Calva doesn't care that the meta data is missing, but both kondo and clojure complains about an unmatched closing paren. Which is fine, Calva likes to be helpful with structure and I don't mind it doing a friendly interpretation of what is a complete form. πŸ˜ƒ


what parser are you using?


Calva's own.


it parses sexprs?


Yes. Imagine if it didn't! πŸ˜ƒ


I wonder how you implemented it then. both clj-kondo and bb are based (indirectly) on tools.reader


Well, actually it isn't a full parser. It is a tokenizer, and then I have a token cursor that can navigate sexprs.


It's completely bespoke. Written from scratch in super-stateful typescript.


I can't really use tools.reader, because it croaks too easily, Calva needs to be much more resilient . πŸ˜ƒ


Is anyone getting this command 'paredit.deleteBackward' not found when hitting delete? I have to hit Shift-Delete to delete a character but that can lead to bad paredit results


I think VS Code updated to the May release on my last reboot


I have tried uninstall Calva, close VS Code, install Calva


It was all working fine prior to update


Does anything else in Calva still work?


@gmercer, I thought I could reproduce the problem there a while, but it turns out I can't. Can you give us some more details about your os and such?


@pez I am and jacked in to both CLJ & CLJS using the re-frame template +shadow option, and everything seems fine. It was working two days before. I think I had the May 2020 Update downloaded but not applied and had to reboot. MacOS 10.14.6 Calva 2.0.103 Version: 1.46.0 Commit: a5d1cc28bb5da32ec67e86cc50f84c67cc690321 Date: 2020-06-10T08:59:06.977Z Electron: 7.3.1 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: OS: Darwin x64 18.7.0


@pez I had another paredit hanging around - removed this, and ALL IS GOOD NOW ... sorry to bother