Skip to content

Commit 2e9bdc6

Browse files
committed
Ignore import declarations in Imenu
1 parent 9d948d9 commit 2e9bdc6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

swift-mode-imenu.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ Return found declarations in reverse order."
118118
(setq next-text (swift-mode:token:text next-token))
119119

120120
(cond
121+
((equal next-text "import")
122+
;; Skips an import kind, for example, "class" token below:
123+
;;
124+
;; import class Foo.Bar
125+
(swift-mode:forward-token-or-list-except-curly-bracket))
126+
121127
((equal next-text "class")
122128
;; "class" token may be either a class declaration keyword or a
123129
;; modifier:

0 commit comments

Comments
 (0)