Skip to content

Commit 21bcca6

Browse files
rectangular-zonejuergenhoetzel
authored andcommitted
Update imenu
1. Provide imenu with a target for module declarations 2. Label imenu candidates appropriately (before, everything came up as "function" -- right _part_ of the time ;P)
1 parent db8ea8d commit 21bcca6

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

fsharp-mode-font.el

+9-8
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,15 @@ with initial value INITVALUE and optional DOCSTRING."
179179
"Match literal | in contexts like match and type declarations.")
180180

181181
(defvar fsharp-imenu-generic-expression
182-
`((nil ,(concat "^\\s-*" fsharp-function-def-regexp) 1)
183-
(nil ,(concat "^\\s-*" fsharp-pattern-function-regexp) 1)
184-
(nil ,(concat "^\\s-*" fsharp-active-pattern-regexp) 1)
185-
(nil ,(concat "^\\s-*" fsharp-member-function-regexp) 1)
186-
(nil ,(concat "^\\s-*" fsharp-overload-operator-regexp) 1)
187-
(nil ,fsharp-constructor-regexp 1)
188-
(nil ,fsharp-type-def-regexp 1)
189-
)
182+
`((nil ,(concat "^\\s-*" fsharp-function-def-regexp) 1)
183+
(nil ,(concat "^\\s-*" fsharp-pattern-function-regexp) 1)
184+
("Active Pattern" ,(concat "^\\s-*" fsharp-active-pattern-regexp) 1)
185+
("Member" ,(concat "^\\s-*" fsharp-member-function-regexp) 1)
186+
("Overload Operator" ,(concat "^\\s-*" fsharp-overload-operator-regexp) 1)
187+
("Constructor" ,fsharp-constructor-regexp 1)
188+
("Type" ,fsharp-type-def-regexp 1)
189+
("Module" ,(concat "\\s-*module " fsharp-var-or-arg-regexp) 1))
190+
190191
"Provide iMenu support through font-locking regexen.")
191192

192193
(defun fsharp-imenu-load-index ()

0 commit comments

Comments
 (0)