eraserhd / parinfer-rust

A Rust port of parinfer.
ISC License
540 stars 41 forks source link

VS Code plugin #91

Open Immortalin opened 4 years ago

Immortalin commented 4 years ago

Hi, can you add an extension for visual studio code?

eraserhd commented 4 years ago

I'm already too backlogged with the core stuff, Vim, and Kakoune, so I can't do it. I posted it on #parinfer on the Clojurians slack in case someone else is interested. And, of course, I'd be willing to answer questions on Slack or here if you want to take this on.

oakmac commented 2 years ago

FYI - as of earlier this week, Calva has decent Parinfer support for VS Code.

It is not exactly Parinfer's Smart Mode, but a neat combination of Indent Mode + the Calva autoformatter. For most use cases, it feels like Smart Mode.

More information in this PR and twitter thread.

gdw2 commented 1 year ago

VS Code also has a neovim extension which allows you to leverage parinfer-rust through neovim. After every keystroke it calls nvim_buf_set_text which doesn't play well with parinfer's 'smart' mode as every keystroke causes parinfer to reformat the text. This means you can't add spaces to the end of form. (E.g. can't change (foo) -> (foo ) in anticipation of eventually typing (foo bar).)