This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-14
Channels
- # babashka (18)
- # beginners (92)
- # calva (11)
- # cljs-dev (2)
- # clojure (37)
- # clojure-berlin (6)
- # clojure-czech (2)
- # clojure-dev (6)
- # clojure-europe (50)
- # clojure-france (15)
- # clojure-nl (4)
- # clojure-spec (1)
- # clojure-uk (18)
- # clojurescript (29)
- # cursive (31)
- # data-science (1)
- # datascript (2)
- # datomic (26)
- # depstar (55)
- # devcards (1)
- # duct (3)
- # emacs (49)
- # fulcro (29)
- # joker (3)
- # kaocha (1)
- # membrane (5)
- # midje (3)
- # music (2)
- # nrepl (4)
- # off-topic (3)
- # parinfer (13)
- # pathom (1)
- # portal (5)
- # re-frame (13)
- # ring (1)
- # schema (1)
- # sci (7)
- # shadow-cljs (25)
- # tools-deps (10)
- # vim (34)
- # vrac (2)
- # xtdb (20)
anyone has the *
search working well while editing clojure files ? when I do *
on a namespace name from the require list (aliased or not, let's pretend async
), I'm always expecting my search to find every use of the name in the file, but I always get caught by the fact that it doesn't match things like async/go
I don't know if it helps but g*
matches partial strings. This way it will match async/go
but also any string that contains async
like when you're cleaning up a bit your requires, you'd like to know if a namespace is used at all, a *
won't do it for me which makes me sad
ah, I started using clj-kondo
via the ALE
plugin and that helps me clean up my unused namespaces
@tedefump If you'd like to see where core.async is being used in your code base, you can use analysis output: https://github.com/borkdude/clj-kondo/tree/master/analysis There are some tools based on this for visualizing namespace/var dependencies: https://github.com/SevereOverfl0w/vizns https://github.com/benedekfazekas/morpheus
Another tool is https://github.com/borkdude/carve for discovering unused vars
Additionally vim-iced, a vim plugin also can use clj-kondo for discovering dependencies: https://twitter.com/uochan/status/1304916698827382784
it's fine, I gave the example on unsused namespace but that wasn't the best example tbh
@tedefump Here are some docs: https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#vim--neovim
Fyi, fireplace has fixed the error problem that's been on master for a while. Also :Stacktrace has been massively improved.
@tedefump just brainstorming for a moment: what about a key that took the last symbol searched for via *
/ #
but then searched for only the part before the /
if any?
or expanded the search to include things that start with <sym>/
if you were originally searching for <sym>
@tedefump @noisesmith doesn’t star respect word boundaries? http://vimdoc.sourceforge.net/htmldoc/options.html#'iskeyword'
in a clojure mode, / should not be a word boundary
commands built on "w" etc would be annoying otherwise
but the intentional split on "/" in particular seems useful as an additional feature
I wouldn’t mind making / a word boundary. But in any case you could write a command that temporarily changes the iskeyword setting when you press star. I’ll try that tomorrow.
if I am on foo/bar
, the intuitive thing is to search for foo/bar
when using *
and that's what the default clojure language def does. but yeah a prefix or modification does sound cool.