{"id":13646621,"url":"https://github.com/elixir-editors/emacs-elixir","last_synced_at":"2026-03-13T11:32:09.750Z","repository":{"id":7835330,"uuid":"9206788","full_name":"elixir-editors/emacs-elixir","owner":"elixir-editors","description":"Emacs major mode for Elixir ","archived":false,"fork":false,"pushed_at":"2023-06-26T17:40:10.000Z","size":693,"stargazers_count":451,"open_issues_count":41,"forks_count":93,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-04-21T21:38:24.859Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elixir-editors.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"2013-04-03T22:53:59.000Z","updated_at":"2025-03-31T03:25:07.000Z","dependencies_parsed_at":"2024-06-19T01:35:43.631Z","dependency_job_id":"878ad0a5-896f-4077-a2e4-8b63e6a8f63e","html_url":"https://github.com/elixir-editors/emacs-elixir","commit_stats":{"total_commits":606,"total_committers":60,"mean_commits":10.1,"dds":0.7227722772277227,"last_synced_commit":"00d6580a040a750e019218f9392cf9a4c2dac23a"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/elixir-editors/emacs-elixir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-editors%2Femacs-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-editors%2Femacs-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-editors%2Femacs-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-editors%2Femacs-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-editors","download_url":"https://codeload.github.com/elixir-editors/emacs-elixir/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-editors%2Femacs-elixir/sbom","scorecard":{"id":373132,"data":{"date":"2025-08-11","repo":{"name":"github.com/elixir-editors/emacs-elixir","commit":"00d6580a040a750e019218f9392cf9a4c2dac23a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":7,"reason":"Found 10/13 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/elixir-editors/emacs-elixir/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/elixir-editors/emacs-elixir/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/elixir-editors/emacs-elixir/ci.yml/master?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/ci.yml:36","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'","Warn: branch protection not enabled for branch 'v2.4'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T13:27:17.069Z","repository_id":7835330,"created_at":"2025-08-18T13:27:17.069Z","updated_at":"2025-08-18T13:27:17.069Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30466314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-08-02T01:03:01.118Z","updated_at":"2026-03-13T11:32:09.728Z","avatar_url":"https://github.com/elixir-editors.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp","Tooling"],"sub_categories":[],"readme":"[![License GPL 3][badge-license]](http://www.gnu.org/licenses/gpl-3.0.txt)\n[![Build Status](https://github.com/elixir-editors/emacs-elixir/actions/workflows/ci.yml/badge.svg)](https://github.com/elixir-editors/emacs-elixir/actions)\n[![NonGNU ELPA](https://elpa.nongnu.org/nongnu/elixir-mode.svg)](https://elpa.nongnu.org/nongnu/elixir-mode.html)\n[![MELPA Stable](http://stable.melpa.org/packages/elixir-mode-badge.svg)](http://stable.melpa.org/#/elixir-mode)\n[![MELPA](http://melpa.org/packages/elixir-mode-badge.svg)](http://melpa.org/#/elixir-mode)\n\n\u003e **WARNING**\n\u003e There is a built-in Elixir mode with tree-sitter support from Emacs 30+ that can also be used with Emacs 29\n\u003e This repository is for an older elixir-mode built with SMIE (Simple Minded Indentation Engine) which is not\n\u003e as advanced as tree-sitter for a language like Elixir.\n\n# Elixir Mode\n\nProvides font-locking, indentation and navigation support for the\n[Elixir programming language.](http://elixir-lang.org/)\n\n## Installation\n\n`elixir-mode` is available on [NON-GNU ELPA](https://elpa.nongnu.org/), \n[MELPA STABLE](https://stable.melpa.org/) and [MELPA](https://melpa.org/).\n\n### Via package.el\n\n`package.el` is the built-in package manager in Emacs.\n\nYou can install `elixir-mode` with the following command:\n\n\u003ckbd\u003eM-x package-install [RET] elixir-mode [RET]\u003c/kbd\u003e\n\nor by adding this bit of Emacs Lisp code to your Emacs initialization file\n(`.emacs` or `init.el`):\n\n```el\n(unless (package-installed-p 'elixir-mode)\n  (package-install 'elixir-mode))\n```\n\nIf the installation doesn't work try refreshing the package list:\n\n\u003ckbd\u003eM-x package-refresh-contents [RET]\u003c/kbd\u003e\n\nKeep in mind that MELPA packages are built automatically from\nthe `master` branch, meaning bugs might creep in there from time to\ntime. Never-the-less, installing from MELPA is the recommended way of\nobtaining `Elixir-Mode`.\n\nMELPA Stable contains packages released from our tags.\n\n### Via use-package\n\nSince Emacs 29, `use-package` is a built-in feature. For versions prior to 29 \none can also install it from MELPA (and MELPA Stable).\n\nTo install elixir-mode using `use-package` one can:\n\n``` elisp\n(use-package elixir-mode\n  :ensure t)\n```\n\n## Usage\n\n### Interactive Commands\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003eCommand (For the \u003ccode\u003eM-x\u003c/code\u003e prompt.)\u003c/th\u003e\n        \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eelixir-mode\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eSwitches to elixir-mode.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eelixir-mode-open-github\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eOpen the GitHub page for Elixir.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eelixir-mode-open-elixir-home\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eGo to Elixir README in the browser.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eelixir-mode-open-docs-master\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eOpen the Elixir documentation for the master.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eelixir-mode-open-docs-stable\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eOpen the Elixir documentation for the latest stable release.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eelixir-mode-show-version\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003ePrint version info for elixir-mode.\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n### Configuration\n\nAny file that matches the glob `*.ex[s]` or `*.elixir` is\nautomatically opened in elixir-mode, but you can change this\nfunctionality easily.\n\n```lisp\n;; Highlights *.elixir2 as well\n(add-to-list 'auto-mode-alist '(\"\\\\.elixir2\\\\'\" . elixir-mode))\n```\n\n### Keymapping\n\nKeymaps can be added to the `elixir-mode-map` variable.\n\n### Pairing\n\n[Smartparens](https://github.com/Fuco1/smartparens) has direct support for Elixir.\n\nAlternatively, if you want to use `ruby-end-mode`, you can add the following to your `elixir-mode-hook`:\n\n```lisp\n(add-to-list 'elixir-mode-hook\n             (defun auto-activate-ruby-end-mode-for-elixir-mode ()\n               (set (make-variable-buffer-local 'ruby-end-expand-keywords-before-re)\n                    \"\\\\(?:^\\\\|\\\\s-+\\\\)\\\\(?:do\\\\)\")\n               (set (make-variable-buffer-local 'ruby-end-check-statement-modifiers) nil)\n               (ruby-end-mode +1)))\n```\n\n## Notes\n\nThis package is tested only with a single version of OTP and 3 versions of Elixir. Please, always report versions\n (Emacs, Elixir and Erlang/OTP) when raising issues.\n\n## Elixir Tooling Integration\n\nYou can use [web-mode.el](http://web-mode.org) to edit elixir templates (eex files).\n\n[mix.el](https://github.com/ayrat555/mix.el) provides a minor mode for integration with Mix, a build tool that ships with Elixir.\n\n[exunit.el](https://github.com/ananthakumaran/exunit.el) provides `ExUnit` integration.\n\n## Elixir Format\n\nThis mode can call mix for formatting code. When inside an elixir buffer, just type `M-x elixir-format`.\n\nTo automate that, you can add this command to the `before-save` hook.\n\n``` elisp\n;; Create a buffer-local hook to run elixir-format on save, only when we enable elixir-mode.\n(add-hook 'elixir-mode-hook\n          (lambda () (add-hook 'before-save-hook 'elixir-format nil t)))\n```\n\nTo use a `.formatter.exs` you can either set `elixir-format-arguments` globally to a path like this:\n\n``` elisp\n(setq elixir-format-arguments (list \"--dot-formatter\" \"/path/to/.formatter.exs\"))\n```\n\nor you set `elixir-format-arguments` in a hook like this:\n\n``` elisp\n(add-hook 'elixir-format-hook (lambda ()\n                                 (if (projectile-project-p)\n                                      (setq elixir-format-arguments\n                                            (list \"--dot-formatter\"\n                                                  (concat (locate-dominating-file buffer-file-name \".formatter.exs\") \".formatter.exs\")))\n                                   (setq elixir-format-arguments nil))))\n```\n\nIn this example we use [Projectile](https://github.com/bbatsov/projectile) to determine if we are in a project and then set `elixir-format-arguments` accordingly.\n\nPlease note that this code snippet may cause unhappiness if there is no `.formatter.exs` file available.\n\n## Tips \u0026 Tricks\n\n### Prettify symbols\n\nEmacs supports [font ligatures](https://en.wikipedia.org/wiki/Ligature_(writing)). For enabling it for Elixir \nyou can add it to your configuration:\n\n``` elisp\n(add-hook\n 'elixir-mode-hook\n (lambda ()\n   (push '(\"\u003e=\" . ?\\u2265) prettify-symbols-alist)\n   (push '(\"\u003c=\" . ?\\u2264) prettify-symbols-alist)\n   (push '(\"!=\" . ?\\u2260) prettify-symbols-alist)\n   (push '(\"==\" . ?\\u2A75) prettify-symbols-alist)\n   (push '(\"=~\" . ?\\u2245) prettify-symbols-alist)\n   (push '(\"\u003c-\" . ?\\u2190) prettify-symbols-alist)\n   (push '(\"-\u003e\" . ?\\u2192) prettify-symbols-alist)\n   (push '(\"\u003c-\" . ?\\u2190) prettify-symbols-alist)\n   (push '(\"|\u003e\" . ?\\u25B7) prettify-symbols-alist)))\n   \n;; Or if you use use-packge\n\n(use-package elixir-mode\n :hook (elixir-mode . (lambda ()\n    (push '(\"\u003e=\" . ?\\u2265) prettify-symbols-alist)\n    (push '(\"\u003c=\" . ?\\u2264) prettify-symbols-alist)\n    (push '(\"!=\" . ?\\u2260) prettify-symbols-alist)\n    (push '(\"==\" . ?\\u2A75) prettify-symbols-alist)\n    (push '(\"=~\" . ?\\u2245) prettify-symbols-alist)\n    (push '(\"\u003c-\" . ?\\u2190) prettify-symbols-alist)\n    (push '(\"-\u003e\" . ?\\u2192) prettify-symbols-alist)\n    (push '(\"\u003c-\" . ?\\u2190) prettify-symbols-alist)\n    (push '(\"|\u003e\" . ?\\u25B7) prettify-symbols-alist))))\n```\n\n### Formatting\n\nIf you have issues with the formatter provided by this package, you can try\nusing the format function of language servers. Elixir-ls supports this.\n\nOne way to configure this with `eglot` and `use-package` would be:\n\n``` elisp\n(use-package elixir-mode\n :hook (elixir-mode . eglot-ensure)\n (before-save . eglot-format))\n```\n\n### Syntax highlighting for LiveView (and similar techniques for other syntaxes)\n\nWhen you need different major modes in the SAME buffer, Emacs do not provide a standard way. \nThere is an external package that can help here by adding more than one major mode called `poly-mode`.\n\nA possible configuration would be:\n\n``` elisp\n;; Assumes web-mode and elixir-mode are already set up\n;;\n(use-package polymode\n  :mode (\"\\.ex$\" . poly-elixir-web-mode)\n  :config\n  (define-hostmode poly-elixir-hostmode :mode 'elixir-mode)\n  (define-innermode poly-liveview-expr-elixir-innermode\n    :mode 'web-mode\n    :head-matcher (rx line-start (* space) \"~H\" (= 3 (char \"\\\"'\")) line-end)\n    :tail-matcher (rx line-start (* space) (= 3 (char \"\\\"'\")) line-end)\n    :head-mode 'host\n    :tail-mode 'host\n    :allow-nested nil\n    :keep-in-mode 'host\n    :fallback-mode 'host)\n  (define-polymode poly-elixir-web-mode\n    :hostmode 'poly-elixir-hostmode\n    :innermodes '(poly-liveview-expr-elixir-innermode))\n  )\n(setq web-mode-engines-alist '((\"elixir\" . \"\\\\.ex\\\\'\")))\n```\n\n## History\n\nThis mode is based on the [Emacs mode by secondplanet](https://github.com/secondplanet/elixir-mode).\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](https://github.com/elixir-editors/emacs-elixir/blob/master/CONTRIBUTING.md) for guidelines on how to contribute to this project.\n\n## License\n\nCopyright © 2011-2017 Samuel Tonini, Matt DeBoard, Andreas Fuchs, secondplanet and [contributors](https://github.com/elixir-editors/emacs-elixir/contributors).\n\nDistributed under the GNU General Public License, version 3\n\n[badge-license]: https://img.shields.io/badge/license-GPL_3-green.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-editors%2Femacs-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-editors%2Femacs-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-editors%2Femacs-elixir/lists"}