This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-07
Channels
- # announcements (37)
- # babashka (28)
- # beginners (104)
- # calva (28)
- # cider (32)
- # clj-kondo (35)
- # cljs-dev (4)
- # cljsrn (3)
- # clojure (35)
- # clojure-conj (4)
- # clojure-dev (57)
- # clojure-europe (4)
- # clojure-france (6)
- # clojure-gamedev (1)
- # clojure-germany (1)
- # clojure-hamburg (2)
- # clojure-italy (7)
- # clojure-nl (4)
- # clojure-spec (9)
- # clojure-uk (11)
- # clojuredesign-podcast (2)
- # clojurescript (36)
- # clojurex (48)
- # core-async (6)
- # cursive (12)
- # data-science (1)
- # datomic (21)
- # defnpodcast (7)
- # duct (1)
- # events (1)
- # fulcro (56)
- # graalvm (30)
- # graphql (5)
- # jobs (1)
- # joker (21)
- # keechma (1)
- # leiningen (4)
- # off-topic (109)
- # parinfer (20)
- # pathom (27)
- # re-frame (4)
- # shadow-cljs (80)
- # spacemacs (18)
- # sql (32)
- # testing (2)
- # tools-deps (32)
- # vim (20)
Hello. Can someone, in the know, make a brief description on what it is that makes smartmode so hard to implement in vscode? I have been using Calva’s Clojure parser/editor/document mirror a bit the last days, and I think it might be possible for Calva to expose an API to it, which might help. But since I don’t know what the problem is, I might just be wrong about Calva being able to help.
@pez if podcasts are your thing, Shaun talked about it in https://soundcloud.com/user-959992602/s2-e1-lisp-editing-with-shaun-lebron IIRC
However, I have listened to the episode, and I still would need the actual problem in VS Code spelled out.
My memory is very hazy. I remember vaguely something to do about needing to grab control of the global buffer state and not being able to, and something about the nature of events firing and the context available in those events.
It was some time since anyone took a crack at it I think, VSCode might have changed since.
IIRC there’s also a longstanding issue with VSCode Vim that’s reliant on the same issue
My understanding is also hazy, but I believe it was because document update events are asynchronous, and smart mode assumes synchronous updates.
@chrisoakman may remember more details, IIRC he was the one who worked on it.
That’s similar to what I recall. But also that the events lacked information about what had happened… but that could have been me just misunderstanding.
FWIW integrating smart mode was one of the hardest things I’ve ever had to do in Cursive. I wrote up a brain dump about it here:
https://github.com/shaunlebron/parinfer/wiki/Problems-integrating-parinfer-into-Cursive
I don’t know how much of that applies to VS Code but some of it might, in particular since it supports project-wide refactorings via the LSP