Fork me on GitHub

@ericdallo @snoe The newest clj-kondo has a bunch of improvements to hooks. It now supports the .clj_kondo extension for hook code, so other tooling like tools.namespace refresh and Cursive do not get confused by conflicting namespaces on the classpath. I know that you just released lsp, but could we maybe get an upgrade with the newest clj-kondo so people can start migrating?


Cool! I think I can do a release on monday including only that


Cool, thanks!


@U04V15CAJ sorry, I will do today!


Does a boolean flipping refactoring sound useful? Something that would cycle between true and false, whether directly on the boolean token or anywhere in its assignment form, like in lets, maps, defs, etc..


TBH it doesn't sound useful to me 😅 could you share a example?


If you are editing a map:

{:|a true
 :b false}
If LSP had such a refactoring option, editors could be configured to have a hotkey to flip the current boolean value to:
{:|a false
 :b false}
And the same idea anywhere a boolean is being associated to something, or even if the boolean stands on its own in a form like (identity false). It seems kinda trivial, I agree, but I think having a hotkey to do this flipping like this would save some precious keystrokes over time 😛 less navigating around the code :man-shrugging:


It seems to be a really specific case which I think it's not that common for most people you know, it's a valid refactoring, but I like to consider that if we start to add a refactoring for each specific corner case we may have a lot of more code/complexity and the need to explain carefully all those refactorings. I think there are more useful refactorings we could add to clojure-lsp before, but if you disagree, you can open a issue and we can wait for other people's suggestions/upvotes too


That's a fair take. I've been looking at transform.clj a little bit to understand how the refactorings are implemented, but I don't yet have a good sense for how much maintenance overhead each additional one adds to the codebase. If adding such a thing would be a fairly isolated change, I personally think it's worth it, but of course, it should be considered against the needs of the community. I'll log it as an issue, but indeed, if it adds maintenance burden or no one else cares, it shouldn't be added. Thanks!

👍 1
Daniel Vieira23:05:10

If you use vim you can try this plug-in Other editors might have similar plug-ins.


Thanks @U037W3C7KTR, I'll give it a try