mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins, also experimenting with a new font
The font is IBM Plex Mono: https://ibm.github.io/type/
This commit is contained in:
@ -88,7 +88,6 @@ snippet def
|
||||
snippet defd
|
||||
@doc """
|
||||
${1:doc string}
|
||||
|
||||
"""
|
||||
def ${2:name} do
|
||||
${0}
|
||||
@ -96,7 +95,6 @@ snippet defd
|
||||
snippet defsd
|
||||
@doc """
|
||||
${1:doc string}
|
||||
|
||||
"""
|
||||
@spec ${2:name} :: ${3:no_return}
|
||||
def ${2} do
|
||||
@ -127,8 +125,9 @@ snippet defr
|
||||
snippet doc
|
||||
@doc """
|
||||
${0}
|
||||
|
||||
"""
|
||||
snippet im
|
||||
@impl true
|
||||
snippet docf
|
||||
@doc false
|
||||
snippet fn
|
||||
@ -136,7 +135,6 @@ snippet fn
|
||||
snippet mdoc
|
||||
@moduledoc """
|
||||
${0}
|
||||
|
||||
"""
|
||||
snippet mdocf
|
||||
@moduledoc false
|
||||
@ -185,6 +183,8 @@ snippet qu
|
||||
snippet beh
|
||||
@behaviour ${1:Mix.Task}
|
||||
${0}
|
||||
snippet p
|
||||
|> ${0}
|
||||
snippet >e pipe to each
|
||||
|> Enum.each(fn ${1} -> ${0} end)
|
||||
snippet >m pipe to map
|
||||
@ -197,3 +197,39 @@ snippet >i pipe to inspect
|
||||
|> IO.inspect
|
||||
snippet >il pipe to inspect with label
|
||||
|> IO.inspect(label: "${1:label}")
|
||||
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
|
||||
snippet genserver basic genserver structure
|
||||
use GenServer
|
||||
|
||||
@doc false
|
||||
def start_link do
|
||||
GenServer.start_link(__MODULE__, ${1:Map.new})
|
||||
end
|
||||
|
||||
@impl true
|
||||
def init(state) do
|
||||
{:ok, state}
|
||||
end
|
||||
snippet genserver: basic genserver structure
|
||||
use GenServer
|
||||
|
||||
@doc false
|
||||
def start_link, do: GenServer.start_link(__MODULE__, ${1:Map.new})
|
||||
|
||||
@impl true
|
||||
def init(state), do: {:ok, state}
|
||||
snippet impl
|
||||
@impl true
|
||||
def ${1:name} do
|
||||
${0}
|
||||
end
|
||||
|
Reference in New Issue
Block a user