spacemacs

jumar 2021-10-29T07:01:40.016100Z

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)

alexdavis 2021-10-29T08:29:10.017300Z

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

alexdavis 2021-10-29T08:30:16.018Z

Shift-K works without prompting for input for me on latest develop, so not sure about that sorry

practicalli-johnny 2021-10-29T09:14:03.019600Z

@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.

practicalli-johnny 2021-10-29T09:18:56.022600Z

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.

jumar 2021-10-29T12:49:32.026700Z

Tried this SPC f L thing but it doesn't work on my macOS:

jumar 2021-10-29T12:49:34.027100Z

Tried this SPC f L thing but it doesn't work on my macOS:

practicalli-johnny 2021-10-29T14:34:50.028900Z

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.

practicalli-johnny 2021-10-29T14:36:03.029100Z

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)

jumar 2021-10-29T15:52:49.031900Z

Thanks I’ll give it a try on Monday

jumar 2021-10-29T12:46:26.026500Z

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" ?

practicalli-johnny 2021-10-29T14:23:15.028800Z

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

practicalli-johnny 2021-10-29T14:39:27.031100Z

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.

jumar 2021-10-29T06:57:55.013500Z

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?