Skip to content

Conversation

@keathley
Copy link
Contributor

@keathley keathley commented Feb 6, 2016

Highlight function declarations properly. Later we can use this initial pattern to match arguments to functions as well.

screenshot 2016-02-05 22 58 19

Currently this only matches def and defp. It would also make sense to match defmacro and defmacrop. The match works for both function and macro definitions.

As part of this change I've also updated the function and macro snippets to add a default name. Without this the match registers the do as the definition which can look odd. Adding an default name conveniently solves this issue while also being more explicit.

Updated the matching for functions and for macros so that the
function name/macro name is highlighted correctly. Also updated the
snippets for both functions and macros so that they create function
names by default. Without providing a name it highlights the `do` as the
function name which looks odd.
@keathley keathley force-pushed the match-function-definitions branch from 59e3e2f to 9cae73d Compare February 8, 2016 02:04
keathley added a commit that referenced this pull request Feb 8, 2016
Basic matching for function definitions
@keathley keathley merged commit 1a5801b into master Feb 8, 2016
@keathley keathley deleted the match-function-definitions branch February 8, 2016 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants