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?
@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
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
@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?)
ripgrep default arguments can be set using a ripgrep configuration file https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#configuration-file
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
(custom-set-variables
'(helm-ag-base-command "rg --no-heading")
`(helm-ag-success-exit-status '(0 2)))
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.
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?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...
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))
You can set all the leader keys in .spacemacs, no need for your own custom configuration
;; 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 ","