Fork me on GitHub
#calva
<
2019-01-21
>
Chase19:01:31

have you folks been able to get any paredit capability in the vs code terminal/repl? Or at least autocompletion of parens?

Chase20:01:33

also, I'm noticing calva paredit slurp forward doesn't work with quotation marks. Not sure if that is just an uncommon thing to need or if I'm missing something.

Chase20:01:30

didn't mean that to be critical or anything. loving how vs code/calva just works. I was already a fan of cider but I keep migrating more and more from emacs to vs code and find cider and the repl connections very intuitive if not more smooth here.

mseddon20:01:44

@chase-lambert Pertectly valid observation :) That's a known issue with paredit.js. I have implemented a version that uses a lexically analysed sequence of tokens to address this, it will hopefully be coming online in a few weeks or so. 😀

mseddon20:01:26

We will also start supporting raise-sexp, and convolute-sexp at that point, although if you know a use for the latter please let me know :)

Chase20:01:47

nice! I'm not even experienced enough to really know about all that. "lexically analysed sequence of tokens" Alright. haha. could these paredit capabilities apply to the terminal/repl? Syntax highlighting? Rebel-readline is really cool

mseddon21:01:46

The tl:dr is paredit.js just looks at characters in the source and has no idea if it's in a string or comment or whatever. Emacs paredit knows what every part of the file is, and we will soon, too :)

mseddon20:01:31

For that, I am adding a proper repl window with funky html :)

Chase20:01:01

oh, cool! that would be within vs code?

mseddon20:01:30

Yes, we won't be using terminals once that's in.

mseddon20:01:12

There's a bunch of work reworking the existing stuff but we should be there within a month or so from where I'm standing

mseddon20:01:38

https://repl-interactor.netlify.com/ online demo here, but it is just a dumb readline in there, vscode works in our dev branch, but it is not ready for production quite yet

mseddon20:01:39

But fear not, this is definitely a "watch this space!" issue 😀

mattly20:01:23

actually on the topic of paredit slurp, I'd love for it to work more similarly to emacs

mattly20:01:03

(foo (bar (bee 1|)) 2) with the cursor at | should pull two into bar, and then bee

mseddon20:01:09

@mattly Try that demo url! It isn't perfect but that has paredit in there.

mseddon20:01:46

Key bindings are crazy but I had to find a suitable subset that browsers support 😀

mseddon20:01:37

I may have missed something, in which case, I am happy to fix it up

mseddon20:01:12

Emacs is king when it comes to lisp development

mseddon20:01:10

Hm. I think I would not allow that particular behaviour though, will test on emacs tomorrow when I am at a computer

mattly20:01:34

I can't get barf/slurp to work at all in the web demo

mseddon20:01:53

Ah. Mac issue I suspect. It has been a nightmare :)

mattly20:01:06

yeah web keybindings are such

mattly20:01:15

I'm also on a somewhat weird setup

mseddon20:01:25

Sorry about that. It's a pita at the best of times

mattly20:01:48

I have a programmable keyboard and use "mod-taps" whereby my modifiers are on home-row keys but only trigger after they've been held for like 200 ms

mattly21:01:07

it's actually caused issues with some "controlled" web forms

mseddon21:01:19

Oh no. I ain't catering for that using the DOM :D

mattly21:01:40

well it still sends standard keycodes

mseddon21:01:59

I will ping test repls for vscode in the coming weeks here and @ you in it if you like

mattly21:01:15

it just sometimes sends them using a throttle/burst pattern that doesn't typically come from human typists

mattly21:01:41

sure, would love to follow development of this

mseddon21:01:12

We will be using vscode keybindings so if you can get them to work in general, you should be okay once it's good to go

Chase21:01:30

are you familiar with emacs keybindings too? i'm using them in vs code and haven't found any conflicts yet with calva which is great.

Chase21:01:14

maybe C-w in Calva Paredit will conflict I guess.

mseddon21:01:05

Yeah that is from intellij I think. @pez may remember the rationale

mseddon21:01:57

It bites me under win/linux since that is 'close tab', unless calva is active in the current buffer. :)

mseddon21:01:54

That said after a particularly gruelling emacs session I do find I close all my browser tabs by mistake trying to cut text :)

Chase21:01:49

this is off topic but I haven't found an answer to this in vs code chats, is there a keyboard shortcut to move the cursor from the terminal to editor without closing the terminal?

mseddon21:01:43

Not that I am aware of, but that isn't to say there isn't one.

mseddon21:01:22

If there isn't an extension could certainly provide that

Chase21:01:51

i'm worried about keybinding craziness as I already use the emacs keybindings here and also switched out calva's defaults to use that 'alt-v' one. If I keep adding more I'm back to my forever tweaking emacs days.

mseddon21:01:42

Ctrl, meta, super, hyper, alt, shift should be enough room :)

mseddon21:01:56

That SO answer is definitely the right solution btw. Guess those actions don't have a default keybinding

mattly21:01:35

I have many of my vscode shortcuts on hyper or meh

mattly21:01:39

oh wait that's the "warp" mod chord

mseddon21:01:44

😀 if I understand your setup correctly you have as many 'bucky bits' (modifiers) as you want :)

mattly21:01:19

srsly check out QMK firmware

mattly21:01:55

you can basically hyper-optimize a keyboard with it to your personal taste

mseddon21:01:47

Love it. But I have this amazingly expensive cherry that clicks like a firecracker that I love. Bet there is a way to do that at the driver level tho

mattly21:01:00

you might be able to flash it

mseddon21:01:05

Which should ship with every os

mseddon21:01:01

Yeah prolly. Will take a look. If not I haven't written a driver in ages so I should totally write 3 for different OSs 😀

mseddon21:01:26

It wouldn't need to do much

mseddon21:01:45

But man, the concept of free OS level keyboard layout is great

mseddon21:01:27

How long does it take to get productive?

mattly21:01:00

it didn't take me long

mattly21:01:36

I started with the default layout for the keyboard I have (olkb's planck) and just started tweaking from there, thinking about what I wanted

mattly21:01:13

my main goal with the layout I arrived at was to move work off my pinkies and onto my thumbs

mattly21:01:50

some things took a bit of iteration, such as moving enter to a layer, or the position of 0 on my numpad

mseddon21:01:28

I definitely want to try something like that out at some point

mattly21:01:20

unfortunately I can't type on anything else now

Chase22:01:21

so when in the repl and i evaluate a multi line input, is there a way to bring that whole input back up to play around with it again? When I press up arrow it only enters the last line of the multi line input. hope that makes sense.

pez22:01:00

It makes perfect sense. Not at the moment, I don't think it is.