Skip to content

Commit e906093

Browse files
authored
Merge pull request #757 from piotrkwiecinski/consult-imenu
add support for consult imenu
2 parents 34462fc + 532b73e commit e906093

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

AUTHORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Names Sorted Alphabetically:
8383
- Olaf The Viking
8484
- Peter Oliver
8585
- Philippe Ivaldi
86+
- Piotr Kwiecinski
8687
- Rex McMaster
8788
- Roland
8889
- Rosenfeld

lisp/php-mode.el

+11
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
(require 'custom)
7474
(require 'speedbar)
7575
(require 'imenu)
76+
(require 'consult-imenu nil t)
7677
(require 'package)
7778
(require 'nadvice)
7879
(require 'mode-local)
@@ -1267,6 +1268,16 @@ After setting the stylevars run hook `php-mode-STYLENAME-hook'."
12671268
#'semantic-create-imenu-index)
12681269
"Imenu index function for PHP.")
12691270

1271+
(when (bound-and-true-p consult-imenu-config)
1272+
(add-to-list 'consult-imenu-config '(php-mode :toplevel "Namespace"
1273+
:types ((?n "Namespace" font-lock-function-name-face)
1274+
(?p "Properties" font-lock-type-face)
1275+
(?o "Constants" font-lock-type-face)
1276+
(?c "Classes" font-lock-type-face)
1277+
(?f "Functions" font-lock-function-name-face)
1278+
(?i "Imports" font-lock-type-face)
1279+
(?m "Methods" font-lock-function-name-face)))))
1280+
12701281
(autoload 'php-local-manual-complete-function "php-local-manual")
12711282

12721283
(defun php-complete-function ()

0 commit comments

Comments
 (0)