Fork me on GitHub
#calva
<
2020-03-24
>
otwieracz06:03:14

@pez where can I find most recent feat-lsp build of calva?

otwieracz06:03:55

Are there any prebuilt binaries?

otwieracz07:03:29

That's funny. Github does not show CircleCi checks when you are not logged in.

pez07:03:13

Oh, didn't know that. Feel invited to edit that wiki page and add that info.

ananaa09:03:16

Hey just wanted to brew some ideas regarding Calva user experience and to see if others have similar thoughts: So I while ago took getting at least some what familiar with Calva. I mostly use Cursive for my work, but Since i am writing a Clojure beginners course (https://github.com/anan44/it-starts-with-clojure), I thought it would be best to suggest some free to use editor that is super easy to install. Calva was rather obvious choice here. While learning Calva I ran to some issues, which some of them started bothering me. I am sure there is a learning curve here and I am VIM user by heart (which obviously bring some extra issues). After few months I started pondering why did Calva feel a bit clunky to and needlessly complex when I started using it. I managed to boil my ideas down to rather core key issue: Being unopinionated. For working with REPL (which at least for me is the key concern when chosing Clojure IDE) Calva offer 7(?) different ways to evaluate code from file. Which is great, everyone can have their own way to do things! But concern is this: Out of the box, do we have to provide keyboard shortcuts for each and every way of doing this? In fact Calva provides almost 100 different actions, and almost all of them have their dedicated short cuts. This causes issue of major shortcut overlapping with other plugins, but it also causes confusion. What is the default way of working? Do I need all of this? How am I supposed to remember all of this? Etc. I would like to discuss, if we could perhaps have some opinionated defaults set in place, to make on-boarding to Calva more pleasant and easygoing experience for users.

ananaa09:03:25

Sorry for a rant! Those starting words turned out much lengthier than I originally intended.

pez09:03:30

No worries. This is great feedback.

ananaa09:03:54

What I would suggest, is that Calva would offer basic default commands with simple keyboard shortcuts, and remove default shortcuts from rest of the actions. This would guide new users and especially new Clojurists to right way of doing things: REPL driven development.

ananaa09:03:50

For example there should be one default way for Evaluating code. Preferably with simple short cut, no unnecessary combinations. Other options should still be available, and people can opt-in to them by assigning them keyboard short cuts. Lets be honest, most of us use only one way of evaluating code, max two in our daily life. There is no need to have shortkeys mapped for every possible way by default.

ananaa09:03:29

Same goes for connecting to REPL. Most of us use one way of doing that always. I for example always remote connect to REPL I have running in terminal. Having one way for doing this would make starting out much easier for those who are new to the language. We want them to be able to enjoy Clojure, not to worry about configuring environments. Those of us who are familiar what Clojure has to offer, know what kind of options there are and know where to look for them. No matter if there is keyboard shortcuts or not.

pez09:03:47

I can see the concern for conflicts, but not how they otherwise would get in the way for anything.

ananaa09:03:49

Let me know what you think people πŸ˜„ I would love to have discussion around this

pez09:03:22

(regarding shortcuts)

ananaa09:03:03

Well as you said conflicts are rather obvious. But I feel like the fact there is so many of short cuts forces the defaults to be very long and confusing.

ananaa09:03:34

For example evaluate current form: Calva: Ctrl + Options + C + E (how do you even press this conveniently) Cursive: Shift + Cmd + P

ananaa09:03:50

Also new user can easily be confused by plurality of the options. Which one of these am I supposed to use? If only one of the options has shortcuts mapped, it is rather good starting point.

pez09:03:27

It's ctrl+option+c e, just to be picky. πŸ˜ƒ

ananaa09:03:10

aa, true, my bad. πŸ˜„

ananaa09:03:08

I guess I am naturally feeling weird about these sort of hotkeys. Reminds me of emacs too much. But that is obviously my problem.

pez09:03:10

To make conflicts less common, most calva commands uses ctrl+option+c as a start of the chord. aka The Calva Key. πŸ˜ƒ

ananaa09:03:16

not all though, some also use ctrl+option+r

pez09:03:37

I think the more ”suggested” commands could have easier to access shortcuts.

pez09:03:06

Yes, not all, there are some other ”families” of commands. πŸ˜ƒ

ananaa09:03:23

I like that word πŸ˜„

ananaa09:03:27

Where I stand there is very few commands all of us need daily. Evaluate form, load file, change namespace.

ananaa09:03:11

If you wanna get fancy, run tests.

ananaa09:03:53

Then comes paredit, but I would even keep those as their own thing, since not every one uses them. I for example prefer to use vim + parinfer

pez10:03:45

My idea there is that if you don't use paredit, you don't. Same for all commands really. But if it is something Calva is opininated about it is that Paredit is awesome and should be used. πŸ˜ƒ

pez10:03:37

It is easy to disable all paredit shortcuts, anyway.

ananaa10:03:50

Paredit is great, except with vim keys πŸ˜„ Vim plugin manages to break the integrity of the Paredit. It is possible to deleted Parentheses, which kinda breaks the whole thing. Thus Parinfer

ananaa10:03:02

But I am full on aboard with you on opinionating towards Paredit. It is my own stupid preferences that make it so unpractical for me πŸ˜„.

pez10:03:11

Could warrant a keymap of its own.

ananaa10:03:20

Sorry, I am not sure i follow?

pez10:03:30

Paredit has three keymaps today (different sets of shortcuts). It is a bit of a nighmare to maintain, but maybe VIM is a case that should be handled.

ananaa10:03:18

Ya, I don’t know how many of Calva users use Vim setup. It has some other issues as well. For example it has conflict on ESC key, which is rather crucial for vim

pez10:03:45

Yes. I am an old vi user, so can see that, The docs tell people to expect VIM to be a bit painful, is how I have solved it so far.

ananaa10:03:45

I think VIM users have gotten used to it being a bit of a pain always to use VIM setup anywhere else than in actual VIM.

pez10:03:28

I suspect dealing with VIM+paredit involves quite a bit more than creating a keymap.

ananaa10:03:44

i believe you are right

pez10:03:53

But good to have that highlighted. Should probably be added to the docs.

bringe17:03:39

I agree that the default experience could be improved, especially for new users. There could be a bit more "steering" in the right direction, and perhaps we can boil things down a bit as you suggest.

bringe17:03:15

@pez and I have been recently discussing things around this - I won't go into too much detail yet but basically the discussion is around evaluation - where results are displayed, reducing complexity. I know that is a bit vague but I'll let pez decide if he wants to discuss details here yet.

pez17:03:51

Yes, we can sure float those ideas here. But maybe they are a bit too vague yet to make much sense... πŸ˜ƒ

pez17:03:20

I'm not sure I want Calva to steer new users in any particular direction. It could be true that most people only use a handful of shortcuts, but I think they are different handfuls, and that that is beautiful, πŸ˜ƒ

pez17:03:47

I'm happy to promote some best practices, but I'd rather do that using getting started guides.

Darrell17:03:19

Apologies for the trivial question but I haven’t been able to find anything in the search engines: Is there some key sequence I can do that will perform the equivalent of (doc n) on something either highlighted or underneath the cursor?

pez19:03:36

cmd+k cmd+i

Darrell19:03:55

Thanks @pez!

pez19:03:31

cmd+shift+space is also handy. There is a setting that will make it include docs.

hindol21:03:58

@pez I have a peculiar use case. I use Windows and WSL both. The same installation of VSCode can work in both environments thus the settings are shared. However, I want cljfmt.edn path to be different in the two environments. What do you think about accepting multiple cljfmt.edn paths in settings? It should check in sequence and use the first match.

pez21:03:00

Yes please!

pez21:03:35

A glob maybe?

hindol21:03:26

A glob won't work for me. I want to configure only once and not per project.

pez21:03:48

Yeah, it wasn't too well thought trough

hindol21:03:01

In WSL, the path is like /home/<user>/.clojure/cljfmt.edn. In Windows it is entirely different.

pez21:03:09

What about an array of globs? First match wins.

hindol21:03:08

I don't see the value of a glob, but that works too.

pez21:03:18

Maybe what I am after is more like a way to have local configs. Globs do not really solve that...

pez21:03:23

But your original suggestion is great. PR?

hindol21:03:34

Yeah, I have been procrastinating for a while, but I am in complete lockdown starting today, so, maybe it's time.