Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
| impas | `import … as` |
| let | `let … in …` |
| mod | `module` |
| template | `elm-template` |
| type | `type` |
| typea | `type alias (Record)` |

Expand Down
62 changes: 62 additions & 0 deletions Snippets/template.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<snippet>
<content><![CDATA[
module Main exposing (..)

import Browser
import Html exposing (Html, text, div, h1, img)
import Html.Attributes exposing (src)


---- MODEL ----


type alias Model =
{}


init : ( Model, Cmd Msg )
init =
( {}, Cmd.none )



---- UPDATE ----


type Msg
= NoOp


update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
( model, Cmd.none )



---- VIEW ----


view : Model -> Html Msg
view model =
div []
[ img [ src "/logo.svg" ] []
, h1 [] [ text "Your Elm App is working!" ]
]



---- PROGRAM ----


main : Program () Model Msg
main =
Browser.element
{ view = view
, init = \_ -> init
, update = update
, subscriptions = always Sub.none
}
]]></content>
<tabTrigger>elm-template</tabTrigger>
<scope>source.elm</scope>
</snippet>