Fork me on GitHub

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


Are there any prebuilt binaries?


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


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


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 (, 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.


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


No worries. This is great feedback.


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.


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.


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.


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


Let me know what you think people 😄 I would love to have discussion around this


(regarding shortcuts)


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.


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


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.


It's ctrl+option+c e, just to be picky. 😃


aa, true, my bad. 😄


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


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


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


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


Yes, not all, there are some other ”families” of commands. 😃


I like that word 😄


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


If you wanna get fancy, run tests.


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


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


It is easy to disable all paredit shortcuts, anyway.


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


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


Could warrant a keymap of its own.


Sorry, I am not sure i follow?


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.


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


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.


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.


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


i believe you are right


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


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.


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


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


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, 😃


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


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?


cmd+k cmd+i


Thanks @pez!

❤️ 4

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


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


Yes please!


A glob maybe?


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


Yeah, it wasn't too well thought trough


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


What about an array of globs? First match wins.


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


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


But your original suggestion is great. PR?

👍 4

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