This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-29
Channels
- # aleph (3)
- # announcements (29)
- # babashka (99)
- # beginners (30)
- # calva (46)
- # cider (9)
- # clara (1)
- # cljsrn (4)
- # clojars (10)
- # clojure (41)
- # clojure-dev (4)
- # clojure-europe (45)
- # clojure-nl (3)
- # clojure-norway (13)
- # clojure-uk (5)
- # clojurescript (61)
- # community-development (11)
- # cursive (10)
- # data-science (1)
- # events (1)
- # fulcro (17)
- # graphql (1)
- # gratitude (1)
- # holy-lambda (1)
- # jobs (4)
- # jobs-discuss (5)
- # meander (22)
- # off-topic (50)
- # pedestal (3)
- # re-frame (3)
- # reagent (3)
- # reitit (82)
- # releases (2)
- # rewrite-clj (14)
- # shadow-cljs (3)
- # spacemacs (14)
- # tools-deps (7)
- # xtdb (33)
I often use SPC /
instead of projectile-find-file
because it's faster.
How come that a fulltext search is faster than finding a file by a file name?
Another question related to docs - I use Shift-K
quite a bit to show docs (it's the same thing as , h h
)
But a while ago it started prompting me for a symbol every time - I just press Enter, but it's still annoying.
Is there some kind of configuration setting I should tweak?
Can I have a doc popup shown, perhaps on a keypress or automatically after some delay?
(I'm using latest develop and cider if that matters but I had an older version for quite a long time and the behavior was the same)
I believe projectile-find-file
uses find
and SPC /
uses rg
or ag
which are both much faster. There’s some docs on how to use something other than find
I think https://practical.li/spacemacs/before-you-start/recommended-command-line-tools.html#finding-files-faster
Shift-K
works without prompting for input for me on latest develop, so not sure about that sorry
@jumar I assume the help (S-K or , h h) requires a running REPL connection and at least one namespace being evaluated to load Clojure into Cider. I havent always found cider docs 100 reliable though.
I havent noticed any slowness using SPC p f
. I wonder if it slows down on bigger projects or if projectile is using a wider scope than the current project. I use layouts to manage all my projects as well, not sure if that has any effect.
If on a Linux system and have updatedb installed, then there is the command helm-locate (`SPC f l`) that will very quickly find a file across your filespace.
It seems the -b option is missing from the locate command in the FreeBSD OS that MacOSX is based on. I thought the OSX layer may have fixed this, but I didnt find anything in the https://develop.spacemacs.org/layers/+os/osx/README.html Might need to hack the spacemacs code to fix it.
A quick search of the OSX layer and it seems mdfind is used instead of locate
(defun osx/pre-init-helm ()
;; Use `mdfind' instead of `locate'.
(when (spacemacs/system-is-mac)
(spacemacs|use-package-add-hook helm
:post-config
;; Disable fuzzy matchting to make mdfind work with helm-locate
;;
(setq helm-locate-fuzzy-match nil)
(setq helm-locate-command "mdfind -name %s %s"))))
So if the osx layer is added to spacemacs, it may fix helm search (I dont have a mac so cant test I am afraid)Thank you both, super useful!
I thought it might be the view itself that makes it slower as I'm typing in the string to narrow down the search for projectile.
I have a somewhat larger project (monorepo) so there many files but nothing dramatic.
I've just installed fd
and I think it's faster.
For docs - I have a running repl and after I do Shift-K, Enter
it works but the midstep is annoying.
The xtra window is a bit distracting too - does somebody have/use "(auto-)popup docs" ?
Using Emacs lsp-ui (with Clojure-lsp server) has a feature to pop-up docstrings either on mouse or cursor, with a pop-up delay too. https://emacs-lsp.github.io/lsp-ui/#lsp-ui-doc
If there are file patterns that you dont want to see when searching a project (but do want to commit into git), you can add them to a .projectile file in the root of the project https://docs.projectile.mx/projectile/projects.html#ignoring-files If the file patterns are not going to be committed, then add them to the .gitignore file in the root of the project and projectile should ignore them.