{"id":15178677,"url":"https://github.com/sdm-lang/sdml-ctags","last_synced_at":"2026-02-14T07:02:59.393Z","repository":{"id":248195441,"uuid":"828036925","full_name":"sdm-lang/sdml-ctags","owner":"sdm-lang","description":"Universal Ctags support for SDML","archived":false,"fork":false,"pushed_at":"2024-08-29T01:57:23.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T16:55:09.024Z","etag":null,"topics":["ctags","emacs","sdml","vim"],"latest_commit_sha":null,"homepage":"https://sdml.io","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sdm-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-13T00:20:29.000Z","updated_at":"2025-01-29T12:43:25.000Z","dependencies_parsed_at":"2024-09-23T10:02:58.553Z","dependency_job_id":"013162e5-645a-46fa-a285-84ed1c1265fa","html_url":"https://github.com/sdm-lang/sdml-ctags","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"9b49309e3621b924a24751a04b2ecc46efadd01a"},"previous_names":["sdm-lang/sdml-ctags"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sdm-lang/sdml-ctags","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdm-lang%2Fsdml-ctags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdm-lang%2Fsdml-ctags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdm-lang%2Fsdml-ctags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdm-lang%2Fsdml-ctags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdm-lang","download_url":"https://codeload.github.com/sdm-lang/sdml-ctags/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdm-lang%2Fsdml-ctags/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29438984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T05:24:35.651Z","status":"ssl_error","status_checked_at":"2026-02-14T05:24:34.830Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ctags","emacs","sdml","vim"],"created_at":"2024-09-27T15:21:20.860Z","updated_at":"2026-02-14T07:02:59.387Z","avatar_url":"https://github.com/sdm-lang.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Universal Ctags SDML Support\n\nThis repository contains a configuration file to allow [Universal\nCtags](https://ctags.io/) to create tag files for SDML source.\n\nThis allows code navigation in ctags-, or etags-, aware tools such as vim and\nEmacs. The following command will create a common `tags` file for all SDML\nfiles, recursively using the `-R` argument. To generate Emacs compatible `ETAGS`\nfiles add the `-e` argument.\n\n```bash\n❯ ctags -R *.sdm?\n```\n\nBy default the command will create *definition* tags only, which is OK as these\nare the primary purpose of the tool anyway. If you wish to see references you\nneed to enable them on the command-line with the following arguments.\n\n```bash\n❯ ctags -R --extras=+r --fields=+r *.sdm?\n```\n\nThis creates tags as follows.\n\n| **Name**              | **Definition Kind** | **Reference Kind** | **Reference Role** | **Notes** |\n|-----------------------|---------------------|--------------------|--------------------|-----------|\n| Module                | `M`                 | `M`                | `imported`         | 1         |\n| Datatype              | `d`                 | `d`, `t`           | `base`, `type`     | 2         |\n| Entity                | `E`                 | `E`, `t`           | `source`, `type`   | 3         |\n| Enum                  | `e`                 | `t`                | `type`             |           |\n| Event                 | `x`                 | `t`                | `type`             |           |\n| Property              | `p`                 | `p`                | `ref`              |           |\n| Structure             | `s`                 | `t`                | `type`             |           |\n| Union                 | `u`                 | `t`                | `type`             |           |\n| Member                | `m`                 | N/A                | N/A                |           |\n| Variant               | `V`                 | N/A                | N/A                |           |\n| Annotation Property   | N/A                 | `t`                | `assertion`        | 4         |\n| Annotation Constraint | `C`                 | N/A                | N/A                |           |\n| *Type*                | `t`                 | `t`                | `imported`         | 5         |\n\n1. Any unqualified name in an `import` statement is noted as an `imported` module\n   reference.\n2. Datatypes are required to have a base type, this is noted as a `base`\n   datatype reference.\n3. Events denote the source that emits them, this is noted as a `source` entity\n   reference.\n4. The name part of an annotation property is noted as an `assertion` reference.\n   If the right-hand side of an annotation property is a qualified name it is\n   noted as a `type` reference.\n5. Any qualified name in an `import` statement is noted as an `imported` module\n   reference.\n\n```sdml\nmodule example is\n  ;    ^ M:def\n\n  import dc\n  ;      ^ M:imported\n  \n  import xsd:integer\n  ;      ^ t:imported\n\n  @dc:description = \"An example\"@en\n  ;^ t:assertion\n\n  @dc:version =   xsd:decimal(2)\n  ;^ t:assertion  ^ t:type\n  \n  datatype MyInteger \u003c- integer\n    ;      ^ d:def      ^ d:base\n\n  property thingIdentifier -\u003e MyInteger\n    ;      ^ p:def            ^ t:type\n\n  entity BigThing is\n    ;    ^ E:def\n    identity ref thingIdentifier\n    ;            ^ p:ref\n\n    name -\u003e {0..1} string\n    ;^ m:def       ^ t:type\n  end\n\n  enum ThingEnum of\n    ;  ^ e:def\n    ThingOne\n    ; ^ V:def\n    ThingTwo\n    ; ^ V:def\n  end\n  \n  event NewThing source BigThing\n    ;   ^ x:def         ^ E:source\n  \n  structure LittleThing\n  ;         ^ s:def\n  \n  structure OtherThing\n  ;         ^ s:def\n\n  union Things of\n  ;     ^ u:def\n    LittleThing\n    ; ^ V:def\n    OtherThing as SmallThing\n    ;             ^ V:def\n  end\n  \nend\n```\n\n## Installation\n\nThe file `sdml.ctags` should be copied to, or linked into, the Ctags\nconfiguration directory which can be performed by the shell script `install.sh`.\n\nThe easiest way to install is to use the script with no arguments in which case\nthe file in the same directory will be linked into the configuration directory.\nAdding the argument `link` has the same effect.\n\nIf you prefer to copy the file, instead of linking, as part of the install add\nthe `copy` argument.\n\n```bash\n❯ ./install.sh\nLinking from /home/me/.config/ctags/sdml.ctags to /home/me/gh/sdml-ctags/sdml.ctags\n```\n\nTo remove the configuration file from the ctags configuration directory the\ninstall script takes a `remove` argument.\n\n```bash\n❯ ./install.sh remove\nRemoving installed file /home/me/.config/ctags/sdml.ctags\n```\n\n### Installing Universal Ctags\n\nIf you have a `ctags` command, ensure you are running Universal Ctags by checking\nthe result of the version command.\n\n``` bash\n❯ ctags --version\nUniversal Ctags 6.1.0, Copyright (C) 2015-2023 Universal Ctags Team\nUniversal Ctags is derived from Exuberant Ctags.\nExuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert\n  Compiled: Jul  1 2024, 15:08:57\n  URL: https://ctags.io/\n  Output version: 0.0\n  Optional compiled features: ... \n```\n\nDetailed installation instructions are in the project's [Github](https://github.com/universal-ctags/ctags) `README.md` file,\nbut for macos or Linux these seem to be the most commonly used methods:\n\n```bash\n❯ brew install universal-ctags # macos, Linux\n❯ sudo snap install universal-ctags # Linux\n```\n\n## License(s)\n\nThe contents of this repository are made available under the following\nlicenses:\n\n### Apache-2.0\n\n\u003e ```text\n\u003e Copyright 2025 Simon Johnston \u003cjohnstonskj@gmail.com\u003e\n\u003e \n\u003e Licensed under the Apache License, Version 2.0 (the \"License\");\n\u003e you may not use this file except in compliance with the License.\n\u003e You may obtain a copy of the License at\n\u003e \n\u003e     http://www.apache.org/licenses/LICENSE-2.0\n\u003e \n\u003e Unless required by applicable law or agreed to in writing, software\n\u003e distributed under the License is distributed on an \"AS IS\" BASIS,\n\u003e WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\u003e See the License for the specific language governing permissions and\n\u003e limitations under the License.\n\u003e ```\n\nSee the enclosed file [LICENSE-Apache](https://github.com/sdm-lang/sdml-ctags/blob/main/LICENSE-APACHE).\n\n### MIT\n\n\u003e ```text\n\u003e Copyright 2025 Simon Johnston \u003cjohnstonskj@gmail.com\u003e\n\u003e \n\u003e Permission is hereby granted, free of charge, to any person obtaining a copy\n\u003e of this software and associated documentation files (the “Software”), to deal\n\u003e in the Software without restriction, including without limitation the rights to\n\u003e use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n\u003e the Software, and to permit persons to whom the Software is furnished to do so,\n\u003e subject to the following conditions:\n\u003e \n\u003e The above copyright notice and this permission notice shall be included in all\n\u003e copies or substantial portions of the Software.\n\u003e \n\u003e THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n\u003e INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n\u003e PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n\u003e HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n\u003e OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n\u003e SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\u003e ```\n\nSee the enclosed file [LICENSE-MIT](https://github.com/sdm-lang/sdml-ctags/blob/main/LICENSE-MIT).\n\n### Contributions\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\n## Changes\n\n### Version 0.1.0\n\n* Initial release\n\n## Issues\n\nIf you find an issue, please include the following in your report.\n\n1. A minimum working example (MWE), `example.sdml`.\n2. The output of the command `ctags --version`.\n3. The file `tags` and `ctags.out` generated by the following command.\n4. The exact command-line arguments *you* were using.\n\n```bash\n❯ ctags --verbose --sort=no example.sdm \u003ectags.out 2\u003e\u00261\n```\n\nThank you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdm-lang%2Fsdml-ctags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdm-lang%2Fsdml-ctags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdm-lang%2Fsdml-ctags/lists"}