diff --git a/README.md b/README.md index a57356d..c9443be 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ There is currently basic support for the following languages: * Nix * Objective-C * OCaml +* Odin * OpenSCAD * Org mode * Pascal diff --git a/dumb-jump.el b/dumb-jump.el index 85dea7e..2b74765 100644 --- a/dumb-jump.el +++ b/dumb-jump.el @@ -1528,7 +1528,28 @@ or most optimal searcher." (:type "type" :supports ("ag" "grep" "rg" "git-grep") :language "apex" :regex "(class|interface)\\s*JJJ\\b" :tests ("class test:" "public class test implements Something") - :not ("class testnot:" "public class testnot implements Something"))) + :not ("class testnot:" "public class testnot implements Something")) + + ;; odin + (:type "variable" :supports ("ag" "grep" "rg" "git-grep") :language "odin" + :regex "\\s*\\bJJJ\\s*:\\s*([^=\\n]+\\s*:|:|[^=\\n]+\\s*=|=)" + :tests ("test :: struct" + "test ::enum" + "test:: union" + "test: : custom_type" + "test :: [2]f32" + "test : f32 : 20" + "test: i32 : 10" + "test := 20" + "test : f32 = 20" + "test: i32 = 10" + "test: i32= 10" + "test :i32= 10" + "test :: proc()" + "test ::proc() {" + "test:: proc(a: i32) -> i32 {" + "test::proc{}" + "test: :proc \"contextless\" {}"))) "List of regex patttern templates organized by language and type to use for generating the grep command." @@ -1686,7 +1707,8 @@ or most optimal searcher." (:language "hcl" :ext "tf" :agtype "terraform" :rgtype "tf") (:language "hcl" :ext "tfvars" :agtype "terraform" :rgtype nil) (:language "apex" :ext "cls" :agtype nil :rgtype nil) - (:language "apex" :ext "trigger" :agtype nil :rgtype nil)) + (:language "apex" :ext "trigger" :agtype nil :rgtype nil) + (:language "odin" :ext "odin" :agtype nil :rgtype nil)) "Mapping of programming language(s) to file extensions." :group 'dumb-jump