elixir-editors / elixir-tmbundle

A TextMate and Sublime Text Bundle for the Elixir programming language
https://elixir-lang.org/
Other
263 stars 61 forks source link

Highlight defdelegate, defguard & defguardp #149

Closed maxmellen closed 6 years ago

maxmellen commented 6 years ago

Hi there 👋

This PR adds highlighting to defdelegate, defguard & defguardp.

Before

screen shot 2018-02-23 at 11 39 47

After

screen shot 2018-02-23 at 11 39 24

Code used

defmodule DefAllTheThings do
  def public_function(arg) do
    # ...
  end

  defp private_function(arg) do
    # ...
  end

  defdelegate delegate_function(arg), to: OtherModule

  defguard is_public_guard(arg) when is_public(arg) and is_guard(arg)

  defguard is_private_guard(arg) when is_private(arg) and is_guard(arg)
end

Best 🤗

josevalim commented 6 years ago

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart: