Browse Source

Allow project search only if in a project

master
Juan Placencia 4 years ago
parent
commit
4c028663ba
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      uno/modules/ui/completion.org

+ 8
- 1
uno/modules/ui/completion.org View File

@ -91,7 +91,14 @@ Integrate for searching capabilities.
:after (uno-ui-completion ripgrep)
:general
(uno-leader-define
"/" '(consult-ripgrep :which-key "Search files")))
"/" '(uno/ui/completion/search :which-key "Search files"))
:init
(defun uno/ui/completion/search ()
"Check if in known project to avoid autoadd."
(interactive)
(if (projectile-project-p)
(consult-ripgrep)
(user-error "Not in a project"))))
#+END_SRC
* Company

Loading…
Cancel
Save