branch: elpa/swift-mode
commit 2e9bdc692cbf7c2f125de465133ebf3be83e94d8
Author: taku0 <[email protected]>
Commit: taku0 <[email protected]>
Ignore import declarations in Imenu
---
swift-mode-imenu.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/swift-mode-imenu.el b/swift-mode-imenu.el
index df771e2..742e2e4 100644
--- a/swift-mode-imenu.el
+++ b/swift-mode-imenu.el
@@ -118,6 +118,12 @@ Return found declarations in reverse order."
(setq next-text (swift-mode:token:text next-token))
(cond
+ ((equal next-text "import")
+ ;; Skips an import kind, for example, "class" token below:
+ ;;
+ ;; import class Foo.Bar
+ (swift-mode:forward-token-or-list-except-curly-bracket))
+
((equal next-text "class")
;; "class" token may be either a class declaration keyword or a
;; modifier: