Skip to content

Commit dbb9154

Browse files
authored
Support Nim export marker (#407)
1 parent f3176fb commit dbb9154

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dumb-jump.el

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -621,18 +621,18 @@ or most optimal searcher."
621621

622622
;; nim
623623
(:type "variable" :supports ("ag" "grep" "rg" "git-grep") :language "nim"
624-
:regex "(const|let|var)\\s*JJJ\\s*(=|:)[^=:\\n]+"
625-
:tests ("let test = 1234" "var test = 1234" "var test: Stat" "const test = 1234")
624+
:regex "(const|let|var)\\s*JJJ\\*?\\s*(=|:)[^=:\\n]+"
625+
:tests ("let test = 1234" "var test = 1234" "var test: Stat" "const test = 1234" "const test* = 1234")
626626
:not ("if test == 1234:"))
627627

628628
(:type "function" :supports ("ag" "grep" "rg" "git-grep") :language "nim"
629-
:regex "(proc|func|macro|template)\\s*`?JJJ`?\\b\\s*\\\("
630-
:tests ("\tproc test(asdf)" "proc test()" "func test()" "macro test()" "template test()")
629+
:regex "(proc|func|macro|template)\\s*`?JJJ`?\\b\\*?\\s*\\\("
630+
:tests ("\tproc test(asdf)" "proc test()" "func test()" "macro test()" "template test()" "proc test*()")
631631
:not ("\tproc testnot(asdf)" "proc testnot()"))
632632

633633
(:type "type" :supports ("ag" "grep" "rg" "git-grep") :language "nim"
634-
:regex "type\\s*JJJ\\b\\s*(\\{[^}]+\\})?\\s*=\\s*\\w+"
635-
:tests ("type test = object" "type test {.pure.} = enum")
634+
:regex "type\\s*JJJ\\b\\*?\\s*(\\{[^}]+\\})?\\s*=\\s*\\w+"
635+
:tests ("type test = object" "type test {.pure.} = enum" "type test* = ref object")
636636
:not ("type testnot = object"))
637637

638638
;; nix

0 commit comments

Comments
 (0)