{"id":13646476,"url":"https://github.com/jcollard/elm-mode","last_synced_at":"2025-05-16T08:02:44.601Z","repository":{"id":11568883,"uuid":"14056575","full_name":"jcollard/elm-mode","owner":"jcollard","description":"Elm mode for emacs","archived":false,"fork":false,"pushed_at":"2025-04-01T09:15:09.000Z","size":749,"stargazers_count":376,"open_issues_count":14,"forks_count":67,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-09T06:13:16.087Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcollard.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}},"created_at":"2013-11-01T23:24:57.000Z","updated_at":"2025-04-01T09:15:09.000Z","dependencies_parsed_at":"2024-01-08T20:18:58.821Z","dependency_job_id":null,"html_url":"https://github.com/jcollard/elm-mode","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcollard%2Felm-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcollard%2Felm-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcollard%2Felm-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcollard%2Felm-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcollard","download_url":"https://codeload.github.com/jcollard/elm-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493382,"owners_count":22080126,"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-02T01:02:56.891Z","updated_at":"2025-05-16T08:02:44.519Z","avatar_url":"https://github.com/jcollard.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp","Editor plugins"],"sub_categories":["Emacs"],"readme":"[![Melpa Status](http://melpa.org/packages/elm-mode-badge.svg)](http://melpa.org/#/elm-mode)\n[![Melpa Stable Status](http://stable.melpa.org/packages/elm-mode-badge.svg)](http://stable.melpa.org/#/elm-mode)\n[![Build Status](https://github.com/jcollard/elm-mode/workflows/CI/badge.svg)](https://github.com/jcollard/elm-mode/actions)\n\n# elm-mode\n\nElm mode for Emacs.\n\n## Features\n\n1. Syntax highlighting.\n1. Intelligent indentation.\n1. Integration with `elm-make`\n1. Integration with `elm-repl`\n1. Integration with `elm-reactor`\n1. Integration with `elm-package`\n1. Integration with [elm-format][elm-format]\n1. Integration with [elm-test][elm-test]\n\n## Indentation\n\n`elm-mode` indentation is based on cycling: every time you insert a new\nline there will be one or more indentation levels available for you to\nchoose from. The exact number is printed in the minibuffer either as\n`Sole indentation` or `Indent cycle (n)...` where `n` is the number of\navailable indentations to choose from. If the automatic indentation\nlevel was not the one you expected simply hit `TAB` to cycle through the\nlist (note that hitting any other key will cancel the cycle).\n\n### Simpler indentation\nThere is also a simpler indentation mode, `Elm Indent Simple` which doesn't try\nto be as smart as the default one. The benefit of this mode is that it works a\nlittle more similarly to how more conventional editors handle indentation:\nindent one step forward by pressing `TAB`, one step backward with `S-TAB`.\n\nIt tries to be a little smart, however, and guess the easiest to determine\nindentation levels.\n\nYou can enable it by setting a variable, `elm-mode-indent-mode` to\n`#'elm-indent-simple-mode`, for example by doing this:\n\n```elisp\n  (setq elm-mode-hook '(elm-indent-simple-mode))\n```\n\n## Installation\n\nThis package requires *Emacs 25.1 or later*.\n\n### MELPA\n\nYou can install `elm-mode` from the package in\n[MELPA](https://melpa.org/). This is by far the most straightforward\nand recommended installation method.\n\n### From source\n\nAdd this repo to your load-path and `(require 'elm-mode)`. Ensure that\nyou have installed all the dependencies listed in the `Package-Requires`\nheader of `elm-mode.el`.\n\n## Bindings\n\nThe following bindings are available in `elm-mode`:\n\n#### `TAGS`\n\n| Keybinding             | Description                                                         |\n| ---------------------- | ------------------------------------------------------------------- |\n| \u003ckbd\u003eC-c M-t\u003c/kbd\u003e     | Generate a TAGS file for the current project.                       |\n| \u003ckbd\u003eM-.\u003c/kbd\u003e         | Jump to tag at point.                                               |\n| \u003ckbd\u003eM-,\u003c/kbd\u003e         | Jump to previous location after visiting a tag.                     |\n\nTAGS file generation requires that the UNIX `find`, `egrep` commands\nand the Emacs `etags` command be available in your path.\n\nSet or customize `elm-tags-on-save` to `t` to generate a new TAGS file\nfor the current project on every save.\n\nSet or customize `elm-tags-exclude-elm-stuff` to `nil` to include\nsource files inside `elm-stuff` directories when generating the TAGS\nfile.\n\n#### `elm-make`\n\n| Keybinding             | Description                                                                       |\n| ---------------------- | --------------------------------------------------------------------------------- |\n| \u003ckbd\u003eC-c C-c\u003c/kbd\u003e     | Compile the current buffer.                                                       |\n| \u003ckbd\u003eC-u C-c C-c\u003c/kbd\u003e | Compile the current buffer, specifying the output file.                           |\n| \u003ckbd\u003eC-c M-c\u003c/kbd\u003e     | Compile the main elm file.                                           |\n| \u003ckbd\u003eC-u C-c M-c\u003c/kbd\u003e | Compile the main elm file, specifying the output file.               |\n| \u003ckbd\u003eC-c C-a\u003c/kbd\u003e     | Add missing type annotations to the current buffer.                               |\n| \u003ckbd\u003eC-u C-c C-a\u003c/kbd\u003e | Add missing type annotations to the current buffer, prompting before each change. |\n| \u003ckbd\u003eC-c C-r\u003c/kbd\u003e     | Clean up imports in the current buffer.                                           |\n| \u003ckbd\u003eC-u C-c C-r\u003c/kbd\u003e | Clean up imports in the current buffer, prompting before each change.             |\n\n\n#### `elm-repl`\n\n| Keybinding         | Description                                                            |\n| ------------------ | ---------------------------------------------------------------------- |\n| \u003ckbd\u003eC-c C-l\u003c/kbd\u003e | Load the current file in a REPL.                                       |\n| \u003ckbd\u003eC-c C-p\u003c/kbd\u003e | Push the current region to a REPL.                                     |\n| \u003ckbd\u003eC-c C-e\u003c/kbd\u003e | Push the current decl. to a REPL (requires \u003ccode\u003ehaskell-mode\u003c/code\u003e). |\n\n#### `elm-reactor`\n\n| Keybinding             | Description                                                        |\n| ---------------------- | ------------------------------------------------------------------ |\n| \u003ckbd\u003eC-c C-n\u003c/kbd\u003e     | Preview the current buffer in a browser.                           |\n| \u003ckbd\u003eC-u C-c C-n\u003c/kbd\u003e | Preview the current buffer in a browser in debug mode.             |\n| \u003ckbd\u003eC-c C-m\u003c/kbd\u003e     | Preview the main elm file in a browser.               |\n| \u003ckbd\u003eC-u C-c C-m\u003c/kbd\u003e | Preview the main elm file in a browser in debug mode. |\n\n#### `elm-package`\n\n| Keybinding             | Description                                                  |\n| ---------------------- | ------------------------------------------------------------ |\n| \u003ckbd\u003eC-c C-d\u003c/kbd\u003e     | View a function's documentation in a browser.                |\n| \u003ckbd\u003eC-c C-i\u003c/kbd\u003e     | Import a module from one of the dependencies.                |\n| \u003ckbd\u003eC-c C-s\u003c/kbd\u003e     | Sort the imports in the current file.                        |\n| \u003ckbd\u003eC-c M-k\u003c/kbd\u003e     | Open the package catalog.                                    |\n| \u003ckbd\u003eC-u C-c M-k\u003c/kbd\u003e | Open the package catalog, refreshing the package list first. |\n\nThe following bindings are available in the package list buffer:\n\n| Keybinding   | Description                    |\n| ------------ | ------------------------------ |\n| \u003ckbd\u003eg\u003c/kbd\u003e | Refresh package list.          |\n| \u003ckbd\u003en\u003c/kbd\u003e | Next package.                  |\n| \u003ckbd\u003ep\u003c/kbd\u003e | Previous package.              |\n| \u003ckbd\u003ev\u003c/kbd\u003e | View package in browser.       |\n| \u003ckbd\u003em\u003c/kbd\u003e | Mark package for installation. |\n| \u003ckbd\u003ei\u003c/kbd\u003e | Mark package for installation. |\n| \u003ckbd\u003eu\u003c/kbd\u003e | Unmark package.                |\n| \u003ckbd\u003ex\u003c/kbd\u003e | Install marked packages.       |\n\nSet or customize `elm-sort-imports-on-save` to `t` to apply\n`elm-sort-imports` on the current buffer on every save.\n\n#### Completion for Elm \u003e= 0.19\n\nTo obtain completion, code navigation and other niceties, use\n[elm-language-server](https://github.com/elm-tooling/elm-language-server)\nand an LSP package. [eglot](https://github.com/joaotavora/eglot) is a lightweight\nLSP front-end package for Emacs, and has built-in support for `elm-language-server`.\nSome users might prefer the rather larger and more opinionated [lsp-mode](https://github.com/emacs-lsp/lsp-mode).\n\n#### `elm-format`\n\nThe following functionality requires [elm-format][elm-format] to be\ninstalled. `elm-format` does not come with the Elm installer so you\nwill have to install it manually.\n\n| Keybinding         | Description                              |\n| ------------------ | ---------------------------------------- |\n| \u003ckbd\u003eC-c C-f\u003c/kbd\u003e | Automatically format the current buffer. |\n\nEnable `elm-format-on-save-mode` to apply `elm-format` on the current\nbuffer on every save.  You might like to add it to your\n`elm-mode-hook`:\n\n```elisp\n(add-hook 'elm-mode-hook 'elm-format-on-save-mode)\n```\n\nAlternatively, you can enable it on a per-project basis by including an\nentry like the following in your `.dir-locals.el`:\n\n```elisp\n(elm-mode (mode . elm-format-on-save))\n```\n\n#### `elm-test`\n\nThe following functionality requires [elm-test][elm-test] to be\ninstalled.  `elm-test` does not come with the Elm installer so you\nwill have to install it manually.\n\n| Keybinding         | Description                                 |\n| ------------------ | ------------------------------------------- |\n| \u003ckbd\u003eC-c C-v\u003c/kbd\u003e   | Run the test suite for the current project. |\n\n\n[company-mode]: http://company-mode.github.io/\n[elm-format]: https://github.com/avh4/elm-format#installation-\n[elm-test]: https://github.com/rtfeldman/node-test-runner\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcollard%2Felm-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcollard%2Felm-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcollard%2Felm-mode/lists"}