Skip to content

Repository files navigation

Elixir Alias Autosorter

Automatically sorts aliases in Elixir modules on every save. Never see The alias X is not alphabetically ordered among its group again!

showcase

Features

  • Sorts aliases on every save (can be turned off)
  • Sorts aliases on demand using the Sort Elixir Aliases in File command
  • Aliases are sorted only among its group (delimited by newlines or non-aliases)
  • Multi-aliases (such as alias Phoenix.{Controller, PubSub}) are sorted as well
  • Built to comply with Credo.Check.Readability.AliasOrder (with the default :alpha ordering)

Configuration

  • elixirAliasAutosorter.sortOnSave (defaults to true) – Controls whether aliases are sorted automatically on every save. If turned off, aliases will be sorted only when running the Sort Elixir Aliases in File command.
  • elixirAliasAutosorter.includeGlob (defaults to "**/*.ex") – Defines a glob pattern that is used to filter files autosorting will be applied to. You can use for example **/*.{ex, exs} if you also want to sort .exs files, or {config,lib,test}/**/*.{ex,exs} if you want to be more precise.

About

VS Code extension that automatically sorts aliases in Elixir modules on save

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages