This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-05
Channels
- # beginners (240)
- # boot (5)
- # cider (48)
- # clara (2)
- # cljs-dev (3)
- # cljsrn (66)
- # clojure (111)
- # clojure-denver (2)
- # clojure-italy (42)
- # clojure-nl (5)
- # clojure-spec (12)
- # clojure-uk (45)
- # clojurescript (138)
- # community-development (7)
- # core-async (8)
- # datomic (27)
- # emacs (21)
- # euroclojure (6)
- # figwheel (10)
- # fulcro (29)
- # graphql (5)
- # hoplon (3)
- # luminus (1)
- # lumo (7)
- # mount (4)
- # off-topic (13)
- # onyx (20)
- # parinfer (3)
- # pedestal (4)
- # precept (1)
- # proton (3)
- # re-frame (41)
- # reagent (3)
- # reitit (28)
- # ring-swagger (7)
- # shadow-cljs (88)
- # specter (1)
- # testing (10)
- # tools-deps (27)
- # vim (58)
So, I figured out how to get a bunch of my clj-refactor.nvim code into clojure-lsp. It’s actually working pretty nicely with https://github.com/autozimu/LanguageClient-neovim
I’ve only got a gut feeling now, but I think so. Some things like magic requires need completion plugin support Also, there are a lot of cider refactors that I think have questionable utility, but I’d be interested to know which ones people want/use the most.
I know I mostly want (I don't know what they are officially called): inline definition, extract expression to let-name, extract defn, rename, inline-thread-macro, "make"-thread-macro.
This is not a refactor, but I've been thinking about how often I need to do this: (thinger |foo true)
;=> (thinger (| foo) true)
. It's currently ysiW)<I
which is painful.
@eraserhd if i'm understanding correctly what you mean, i can do that with <localleader>w
Well, huh. That works for me too. Except I've set my local leader but I need to use \w
.
\w
inserts a space before the existing first element, because why wouldn't you ever want to do that
i guess that makes sense, because you might just want to wrap a symbol in parens and make it a function call
I guess I remapped my global leader but never my local leader. I kind of like it this way.
@eraserhd those are similar to my top ones - is inline-thread-macro
turning (-> a b)
into (b a)
?
Maybe... instead of just marking failed test lines, it could send the failed test values to Vim as well?
I’ve seen a repl plugin that lets you use zipper commands to navigate data structures - https://github.com/eggsyntax/datawalk
personally, I don’t find myself spending much time on ns forms so it’s nothing I desperately need (unlike parinfer!) but it is certainly a nice-to-have 🙂
Well, I definitely agree that parinfer is a bigger deal. But it's like Jerry Weinberg says, "when you solve your biggest problem, you promote your second biggest problem."
Though, if I'm honest, I have to say that dealing with copious REPL output is a bigger problem for me than dealing with namespaces.
one thing I would really like is a way to eval expressions in Vim and have the output collected in a buffer
I... would love to not duplicate effort. And I'm sad about the startup time of Java (hence the Rust) and needing to "boot" Vim. Even though, writing in Clojure for Clojure has quite a large number of wins. I gotta go home now, but I shall ponder.
clojure-lsp isn't "realtime" though, right? It won't update the namespace as you type.
I get it. I have no problems with rust, just bootstrapping to a point where you manipulate sexps easily is more effort than I can spend..
Ugh, yeah, that will be work (wrt Rust). I actually spent time on a Clojure library that is used by clj-refactor, so I have Ideas about how to do that.
the server can also just send adhoc workspaceEdits as it wishes - so a config to keep clean namespaces would be totally doable
Interesting. This format seems to specify decently stuff I made up or copied from parinfer to send and receive changes.
@schmee OK, really walking out now... but can you give me an illustrative example? I'm curious.
hmm… well, one thing is evaluating some expression in the REPL which produces a data structure, and then I want to put that in a def
I often find that I want to manipulate the output of some expression, maybe def it, maybe put it in a fn
@eraserhd another possibility could be piggybacking on joker https://github.com/candid82/joker since I’m assuming those manipulation tools exist there.