Fork me on GitHub
#spacemacs
<
2020-10-21
>
jumar07:10:26

Whenever I try to "search project" (fulltext search via SPC /) it ignores the "hidden" files - that is file names beginning with . So e.g. I have github actions workflows in the <root>/.github/workflows directory and I can't find any thing inside those files. Is there a way to make it work?

practicalli-john08:10:24

@jumar if you are using rg (might also work for au) as the search binary, then arguments can be added at the end. To search in hidden files for a searchpattern:

searchpattern -- --hidden

practicalli-john08:10:28

Seems there are also these arguments... -u = don't respect .gitignore or .ignore files -uu = same as -u and show hidden files -uuu = same as -uu and search binary files The argument approach might only work if using helm

jumar08:10:50

@jr0cket that's very helpful, thanks! Using -uu seems to be perfect although it would be even better if that was the default (can I change that?)

practicalli-john08:10:28

ripgrep default arguments can be set using a ripgrep configuration file https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#configuration-file

practicalli-john08:10:29

If using helm, then you could also set helm-ag-base-command to include any default options, either in .spacemacs or using the Emacs customize command to set it

practicalli-john08:10:33

(custom-set-variables
 '(helm-ag-base-command "rg --no-heading")
 `(helm-ag-success-exit-status '(0 2)))

practicalli-john08:10:53

https://github.com/emacsorphanage/helm-ag#ripgrep I assume you realise that setting rg to search through hidden files (regardless of method) may slow down searches in certain directories. You may want to exclude .git directories in any config.

mathpunk17:10:44

I'd like to remap my evil lisp state leader. The docs suggest

(evil-lisp-state-leader ", l")
but that causes
(Spacemacs) Error in dotspacemacs/user-config: Symbol's function definition is void: evil-lisp-state-leader
I'm thinking maybe I need to wrap that function in something that waits for something else to load first?

practicalli-john19:10:08

You can set all the leader keys in .spacemacs, no need for your own custom configuration

practicalli-john20:10:01

;; Major mode leader key is a shortcut key which is the equivalent of
   ;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
   dotspacemacs-major-mode-leader-key ","

mathpunk03:10:48

My major-mode leader is fine. It's the leader to enter lisp-state that I'm trying to change

practicalli-john07:10:28

My bad, didnt read properly... Its usually add-hook or with-eval-after-load I cant actually find evil-lisp-state-leader as a variable though...

practicalli-john07:10:49

In the /emacs.d/layers/+spacemacs/spacemacs-evil/packages.el the the lisp spate leader key is set with

(spacemacs/set-leader-keys "k" evil-lisp-state-map)
So I am guessing its something like
(with-eval-after-load 'evil-lisp-state
    (spacemacs/set-leader-keys "k" evil-lisp-state-map))

thanks2 3