Fork me on GitHub
#cider
<
2021-12-18
>
lassemaatta18:12:52

I was experimenting with nubank/matcher-combinators earlier today and noticed that the cider test results show raw escape characters instead of applying a color to the text. Am I doing something wrong or is this related to https://github.com/clojure-emacs/cider/issues/2901?

mister_m20:12:15

Hi - are the ClojureDocs lookups using C-c C-d C-c (`cider-clojuredocs`)something that requires an internet connection?

dpsutton20:12:43

I think it requires an internet connection once to get the entire corpus and then individual lookups use the local versions

👍 1
bozhidar07:12:03

You only need an internet connection to update the local data. We ship some export (basically an EDN file) with Orchard and we update it there from time to time. Older versions of CIDER downloaded the data locally the first time you needed it.

cider 1
mister_m21:12:28

Is there a way to change the order of arguments in a function definitionusing CIDER or the clj-refactor extension that will update usage sites?

mister_m21:12:32

If that isn't directly supported, I am wondering what the best way to do something like that might be.

vemv08:12:12

no it's not offered. clj-refactor and clojure-lsp offer "find usages" functionality. So you can jump to each callsite and edit it by hand (I'd use some paredit to move the symbols around)

vemv08:12:38

If you are interested in a generalized/automated feature, I reckon that would take some rewrite-clj skills

pavlosmelissinos08:12:56

In my experience you shouldn't have to do that a lot. Don't get me wrong, having great tooling is awesome but in this case what you're asking for is a tool to contain complexity created by bad design. Some pointers: 1. In general prefer maps over positional arguments 2. Try not to break your APIs, even if they're internal. Instead of having a messy git diff and risk breaking something during the refactoring, keep the old code as is for compatibility reasons (mark it as deprecated), and create a function that wraps it, using a map. Then gradually convert your usages to the new API. No need to make all the changes in your code in one go. 3. If for some reason you don't want to do either of the above or if few changes are involved, consider refactoring the code by hand (search for usages and change them yourself) - not always possible but sometimes I like to do it as an exercise of why good design is important It helps to ask yourself why. What's wrong with the existing code? Why do I need to refactor it? I've found that most of the time it isn't worth the trouble.

👍 2