aboutsummaryrefslogtreecommitdiffstats
path: root/oni-php
diff options
context:
space:
mode:
Diffstat (limited to 'oni-php')
-rw-r--r--oni-php/oni-php.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/oni-php/oni-php.el b/oni-php/oni-php.el
index e5b50e4..d93e40f 100644
--- a/oni-php/oni-php.el
+++ b/oni-php/oni-php.el
@@ -250,6 +250,16 @@ Do the insert N times."
(defun oni-php-in-static-call-context-p ()
(looking-back "::\\w+" (- (point) (line-beginning-position))))
+(defun oni-php-grep-symbol (symbol)
+ (interactive (list (thing-at-point 'symbol)))
+ (rgrep (rx (literal symbol))
+ (map-elt grep-files-aliases "php")
+ (project-root (project-current))))
+
+(define-key php-ts-mode-map (kbd "C-c .") nil t)
+(define-key php-ts-mode-map (kbd "C-c . g") '("Search for symbol at point" . oni-php-grep-symbol))
+(define-key php-ts-mode-map (kbd "C-c . a") '("Import symbol at point" . oni-php-add-use))
+
;;;###autoload
(when (and (functionp 'treesit-available-p)
(treesit-available-p)