-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parinfer Take 3 #1429
base: dev
Are you sure you want to change the base?
Parinfer Take 3 #1429
Conversation
Not related to the parinfer feature, but beacuse I answered this: https://clojureverse.org/t/we-created-and-maintain-calva-ask-us-anything/7131/34?u=pez
Temporarily. It was hardoded to false before. Which was more wrong. =)
Using a `parinferReadinessBeforeChange` member on the mirrored doc * null before we enter processChanges * set from the model if null * no parinfer done if not healthy before changes started * reset after all extra edits are applied
TODO: Figure out efficient way to stop infer after paredit TODO: Figure out how to stop infer after paredit format
Some weird documents are opened...
I'm switching back to the "release" branch for the moment. There are glitches that don't have an obvious cause-effect relationship. Even with parinfer turned off: backspace sometimes doesn't work, sometimes the syntax highlighting gets all broken, things like that. It's distracting me from work too much at the moment. |
It's a pity it is not really useful yet, but that is very good feedback. The backspace thing I think I know what it is about. Can you describe ”syntax highlighting gets all broken” a bit more? |
Yeah sorry I could have been more precise. I've seen similar screenshots recently with red blocks and the syntax highlighter not recognizing where things start and stop (e.g. strings that are multiple colors). I wonder if it's only this branch though, because just now (with latest: 2.0.231) I saw this: Note that the line with |
I can reproduce those red blocks when editing CRLF files. Do you get it with regular LF files? (That screenshot could be about clojure-lsp semantic tokens going wrong when the file has changed on disk, and if so it is unrelated.) |
This is a feature I would be greatly interested in; are there any new developments or perhaps anything you need a hand with? More testing? |
This will probably never happen. It's probably not impossible. But it was much harder than I thought it was, and I spent too much time on it. So unless someone else is ready to really focus on this, I just do not have the time. I don't even know if I was close... @jvdp, so I think that's where things are. I stand by that I think it isn't impossible. But a lot of hard and frustrating work. If you are like me and like that idea, then by all means, I would be happy to introduce you to the code base and to be a speaking partner. |
Coming from the extension author that does scare me a little bit... ;) going to need to think about this, and wait until I have a bit of time coming up. |
OTH, it could be that it mostly needs another mind. Maybe you would find a better path. That said, don't know if you've read this: https://twitter.com/pappapez/status/1461018167002734592 |
Hi 👋 sorry for being late here. Good job @PEZ with all that you’ve tried. I remember it was hard when I tried five years ago to make it work in this editor (even for plain Indent/Paren Mode?, because either not all changes are broadcast or it is difficult to react to them in time or something, can’t remember). It might be worth investigating the possibility of an upstream PR to vscode itself for something like synchronous change interception, or something close to what Atom provided (I remember atom-parinfer working really well). |
OMG, now I find your message @shaunlebron. Entirely sorry about missing that. Today there was a thread started about Parinfer in the #calva channel at Clojurians Slack. I wrote there that I think I was both very close and not so close in this attempt:
All in all. I think this is entirely possible, and that my general idea of how to do this with what VS Code and Calva has was sound. There is some technical debt in Calva that needs to be taken care off, before attempting this again. I think I might start there. |
What has Changed?
Picking this up where #1381 left off.
More description TBD.
Fixes #
My Calva PR Checklist
I have:
dev
branch. (Or have specific reasons to target some other branch.)published
. (Sorry for the nagging.)[Unreleased]
entry inCHANGELOG.md
, linking the issue(s) that the PR is addressing.ci/circleci: build
test. NB: You need to sign in/up at Circle CI to find the Artifacts tab.Ping @PEZ, @bpringe