Skip to content
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

Open
wants to merge 96 commits into
base: dev
Choose a base branch
from
Open

Parinfer Take 3 #1429

wants to merge 96 commits into from

Conversation

PEZ
Copy link
Collaborator

@PEZ PEZ commented Dec 8, 2021

What has Changed?

Picking this up where #1381 left off.

More description TBD.

Fixes #

My Calva PR Checklist

I have:

  • Read How to Contribute.
  • Directed this pull request at the dev branch. (Or have specific reasons to target some other branch.)
  • Made sure I have changed the PR base branch, so that it is not published. (Sorry for the nagging.)
  • Updated the [Unreleased] entry in CHANGELOG.md, linking the issue(s) that the PR is addressing.
  • Figured if anything about the fix warrants tests on Mac/Linux/Windows/Remote/Whatever, and either tested it there if so, or mentioned it in the PR.
  • Added to or updated docs in this branch, if appropriate
  • Tested the VSIX built from the PR (so, after you've submitted the PR). You'll find the artifacts by clicking Show all checks in the CI section of the PR page, and then Details on the ci/circleci: build test. NB: You need to sign in/up at Circle CI to find the Artifacts tab.
    • Tested the particular change
    • Figured if the change might have some side effects and tested those as well.
    • Smoke tested the extension as such.
  • Referenced the issue I am fixing/addressing in a commit message for the pull request.
    • If I am fixing the issue, I have used GitHub's fixes/closes syntax
    • If I am fixing just part of the issue, I have just referenced it w/o any of the "fixes” keywords.
  • Created the issue I am fixing/addressing, if it was not present.

Ping @PEZ, @bpringe

PEZ added 30 commits December 8, 2021 17:06
Temporarily. It was hardoded to false before. Which was more wrong. =)
@svdo
Copy link
Contributor

svdo commented Dec 20, 2021

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.

@PEZ
Copy link
Collaborator Author

PEZ commented Dec 20, 2021

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?

@svdo
Copy link
Contributor

svdo commented Dec 21, 2021

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:

Screenshot 2021-12-21 at 07 57 19

Note that the line with js/console.debug is a comment...

@PEZ
Copy link
Collaborator Author

PEZ commented Dec 21, 2021

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.)

@jvdp
Copy link

jvdp commented Sep 19, 2022

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?

@PEZ
Copy link
Collaborator Author

PEZ commented Sep 19, 2022

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.

@jvdp
Copy link

jvdp commented Sep 22, 2022

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.

@PEZ
Copy link
Collaborator Author

PEZ commented Sep 22, 2022

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
It looks long, but wait until you have expanded some of the ”Show more tweets” 😄

@shaunlebron
Copy link

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).

@PEZ
Copy link
Collaborator Author

PEZ commented Oct 10, 2023

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:

  • Very close, because there were no real signs of VS Code stopping it. (As I in hindsight see things).
  • Not so close, because I was going about it a bit stupid and didn't have the sense to do things in smaller steps, where each step built the foundation I needed. Instead I was thinking (I'll fix that thing later, and “that thing” kept tripping me up.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants