This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (10)
- # aws-lambda (9)
- # babashka (14)
- # beginners (166)
- # calva (63)
- # chlorine-clover (4)
- # cider (40)
- # cljs-dev (4)
- # clojure (182)
- # clojure-europe (18)
- # clojure-italy (5)
- # clojure-nl (5)
- # clojure-spec (17)
- # clojure-uk (55)
- # clojurescript (11)
- # core-async (12)
- # crux (19)
- # cursive (23)
- # datascript (5)
- # datomic (19)
- # emacs (4)
- # fulcro (46)
- # graalvm (2)
- # hoplon (2)
- # joker (3)
- # juxt (1)
- # keechma (2)
- # leiningen (20)
- # malli (1)
- # meander (7)
- # nrepl (1)
- # off-topic (72)
- # pedestal (6)
- # re-frame (15)
- # reitit (7)
- # shadow-cljs (34)
- # sql (14)
- # testing (14)
- # tools-deps (11)
- # tree-sitter (1)
- # vim (14)
- # yada (3)
That would be here: https://github.com/BetterThanTomorrow/calva/pull/572
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.
Sorry for a rant! Those starting words turned out much lengthier than I originally intended.
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.
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.
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. 😃
Where I stand there is very few commands all of us need daily. Evaluate form, load file, change namespace.
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. 😃
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 😄.
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 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?
@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.
In WSL, the path is like
/home/<user>/.clojure/cljfmt.edn. In Windows it is entirely different.
Maybe what I am after is more like a way to have local configs. Globs do not really solve that...