{"id":13593052,"url":"https://github.com/josteink/wsd-mode","last_synced_at":"2025-04-09T22:19:31.223Z","repository":{"id":24148373,"uuid":"27537947","full_name":"josteink/wsd-mode","owner":"josteink","description":"A major-mode for Emacs and websequencediagrams.com ","archived":false,"fork":false,"pushed_at":"2020-12-10T06:54:34.000Z","size":170,"stargazers_count":342,"open_issues_count":2,"forks_count":7,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-02T04:36:57.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/josteink.png","metadata":{"files":{"readme":"README.org","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}},"created_at":"2014-12-04T11:43:03.000Z","updated_at":"2025-03-24T06:07:51.000Z","dependencies_parsed_at":"2022-07-27T04:32:22.947Z","dependency_job_id":null,"html_url":"https://github.com/josteink/wsd-mode","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josteink%2Fwsd-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josteink%2Fwsd-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josteink%2Fwsd-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josteink%2Fwsd-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josteink","download_url":"https://codeload.github.com/josteink/wsd-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119527,"owners_count":21050781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-01T16:01:16.100Z","updated_at":"2025-04-09T22:19:31.203Z","avatar_url":"https://github.com/josteink.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"* wsd-mode\r\n\r\nwsd-mode is a Emacs major-mode for\r\n[[http://www.websequencediagrams.com][www.websequencediagrams.com]].\r\n\r\nBuild status: [[https://github.com/josteink/wsd-mode/workflows/CI/badge.svg]]\r\n\r\n** wsd-mode explained in two screenshots\r\n\r\nModel processes through simple sequence-scripts like this:\r\n\r\n[[https://github.com/josteink/wsd-mode/raw/devel/artwork/wsd-mode-1.png]]\r\n\r\nAnd get pretty diagrams like this generated for you:\r\n\r\n[[https://github.com/josteink/wsd-mode/raw/devel/artwork/wsd-mode-2.png]]\r\n\r\nIf that sounds interesting and you want to know how that works,\r\nfeel free to read along.\r\n\r\n** Features\r\n\r\nThe major-mode provides the following features:\r\n\r\n- proper syntax highlighting for all standard WSD syntax. Almost\r\n  feature complete syntax for pro-only features (see [[https://github.com/josteink/wsd-mode/issues][issues]])\r\n- indentation based on nested constructs and alternative paths.\r\n- supports running Emacs in GUI and the terminal.\r\n- auto-generating diagrams based on source.\r\n- inline rendering in Emacs frames when possible, with fallback to OS or\r\n  browser for viewing when critical features are unavailable.\r\n- ~org-babel~ support (use ~wsd~ as language).\r\n- ~company-mode~ support.\r\n- limited ~flycheck~ support.\r\n\r\n\r\n** Installation\r\n\r\nwsd-mode can be installed as a package, from Marmalade, MELPA and MELPA stable.\r\n\r\nInstallation from MELPA will be a development snapshot and always be latest version.\r\nVersions available from Marmalade and MELPA stable should match, and be more stable versions\r\nreleased at less frequent intervals.\r\n\r\nTo install the package, simply start Emacs and issue the following command:\r\n\r\n~M-x package-install \u003cRET\u003e wsd-mode \u003cRET\u003e~.\r\n\r\n** Usage\r\n\r\nUsing wsd-mode is very easy. Either create a new buffer and activate using\r\n~M-x wsd-mode~, or open a new file with a ~.wsd~ extension. For files with\r\na ~.wsd~ extension wsd-mode is activated automatically.\r\n\r\nOnce the mode is active, type along as you would otherwise do on\r\n[[websequencediagrams.com]].\r\n\r\n*** Key-bindings\r\n\r\n| Key     | Action                                                      |\r\n|---------+-------------------------------------------------------------|\r\n| C-c C-c | \"Build\" diagram and display inline in Emacs (when possible) |\r\n| C-c C-e | \"Export\" diagram and show online on [[websequencediagrams.com]] |\r\n\r\n\r\n*** Customization\r\n\r\nAll customizable options are available in the normal Emacs customize\r\nframework.\r\n\r\n~M-x customize-group \u003cRET\u003e wsd-mode~\r\n\r\nBriefly, here are the defaults for the variables which can be customized:\r\n\r\n- wsd-base-url (default \"http://www.websequencediagrams.com/\". The URL of your in-house WSD installation)\r\n- wsd-api-key (default blank. required for premium-features.)\r\n- wsd-format (default png. svg requires premium, thus api-key.)\r\n- wsd-style (default modern-blue)\r\n- wsd-indent-offset (default 4)\r\n- wsd-font-lock-keywords\r\n\r\n~wsd-mode~ supports three different fontification levels:\r\n\r\n- ~wsd-font-lock-keywords-1~: keywords \r\n- ~wsd-font-lock-keywords-2~: keywords and operators\r\n- ~wsd-font-lock-keywords-3~: keywords, operators and variables (default)\r\n\r\n*** Org-babel\r\n\r\nFor usage with org-babel create a ~#+BEGIN_SRC~ block with ~wsd~ as language. Use ~C-c C-c~ to evaluate\r\nthe code and write the diagram to disk, putting it in a ~#+RESULTS:~ block below.\r\n\r\nYou can optionally use a ~:file~ parameter as argument to use a hard-coded filename instead of having one\r\ngenerated for you automatically, on the fly.\r\n\r\nWhen exporting org-document as HTML or similar (~C-e C-c h o~), the ~wsd-mode~ code will not be included\r\nin the document, but instead the rendered diagram.\r\n\r\nSee the [[demo.org]]-file for a concrete example. It is recommended to\r\ninspect this file in Emacs, not on Github.\r\n\r\n*** Flycheck\r\n\r\n~wsd-mode~ has limited support for ~flycheck~. While flycheck in general does\r\nall the checking as you type, providing you with real-time feedback,\r\n~wsd-mode~ only updates the error-list upon script-compilation.\r\n\r\nThis means that using flycheck should incur no extra processing cost, and\r\ntherefore, if flycheck is installed, it will also be activated automatically whenever\r\n~wsd-mode~ is.\r\n\r\nThis is due to implementation and may be subject to change in the future.\r\n\r\n*** company-mode\r\n\r\n~wsd-mode~ supports company-mode completion. Enable it the way you\r\nusually enable it in your init.el:\r\n\r\n#+BEGIN_SRC emacs-lisp\r\n  (add-hook 'wsd-mode-hook 'company-mode)\r\n#+END_SRC\r\n\r\nCurrently completion on keywords and participants is supported.\r\n\r\n** Planned features\r\n\r\nThe following features has been considered. They may eventually be\r\nimplemented:\r\n\r\n- auto-insert-mode integration?\r\n- websequencediagram.com account-integration?\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosteink%2Fwsd-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosteink%2Fwsd-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosteink%2Fwsd-mode/lists"}