Skip to content

Conversation

craigp
Copy link
Contributor

@craigp craigp commented Sep 6, 2017

No description provided.

Copy link
Contributor

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this a lot. I was wondering if we would want to pass the opts to start link by default? Or place the cursor in the start args perhaps?

@craigp
Copy link
Contributor Author

craigp commented Sep 7, 2017

Maybe something like this?

snippet cs
	@doc false
	def child_spec(${1:_opts}) do
		%{
			id: __MODULE__,
			start: {__MODULE__, :start_link, ${2:[]}},
			restart: ${3::permanent},
			shutdown: ${4:5000},
			type: ${5::worker}
		}
	end

@lpil
Copy link
Contributor

lpil commented Sep 7, 2017

I like that 👍

@lpil
Copy link
Contributor

lpil commented Sep 8, 2017

Could you resolve the merge conflicts please?

@craigp
Copy link
Contributor Author

craigp commented Sep 10, 2017

Hmm, that's weird, wasn't showing me any. I've merged in and pushed all upstream master changes.

@lpil
Copy link
Contributor

lpil commented Sep 11, 2017

Thanks :)

@lpil lpil merged commit d993ee0 into honza:master Sep 11, 2017
@craigp craigp deleted the elixir/child_spec branch September 11, 2017 11:48
jdsutherland pushed a commit to jdsutherland/vim-snippets that referenced this pull request Oct 16, 2017
* child_spec for Elixir 1.5 workers/supervisors

* Extra parans for child_spec opts and args
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