• Sign In



  • Categories

    Extension Details



    Readme

    Elixir Clips for Nova

    Description

    This extension for Nova provides code clips covering core Elixir constructs, LiveView, Testing and OTP"

    Core Elixir Clips

    Trigger Description
    case→ case statement
    cond→ cond statement
    def→ def (multi-line)
    df→ def (one-line)
    depf→ defp
    defc→ defcallback
    defd→ defdelegate
    defe→ defexception
    defi→ defimpl
    dmac→ defmacro
    defpro→ defprotocol
    defs→ defstruct
    do→ do block
    doc→ @doc
    fn→ fn args -> end
    for→ for item <- items do: end
    fori→ for item <- items, into: [] do: end
    ife→ if else end
    if→ if end
    ii→ IO.inspect()
    iin→ IO.inspect( limit: infinity)
    ip→ IO.puts("")
    ::→ key => value
    mdoc→ @moduledoc """ """
    p→
    pry→ require IEx; IEx.pry
    _M→ MODULE

    LiveView Clips

    Trigger Description
    he→ def handle_event
    hi→ def handle_info
    lvm→ defmodule Live
    lvt→ defmodule LiveTest
    mount→ def mount()
    render→ def render()

    OTP Clips

    Trigger Description
    init→ def init()
    sl→ def start_link()

    EEx Clips

    Trigger Description
    ee→ <%= %>
    for→ for comprehension in eex
    if→ if in eex
    else→ <% else %>
    end→ <% end %>
    cond→ cond in eex

    Acknowledgements

    Elixir Code Clips is based on Florin's VS Code extension

    License

    The MIT License (MIT)

    Copyright (c) 2020, Mike Ratliff

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    Release Notes

    Version 1.0.4

    Adds syntax support for HTML fiel types. Emmet only wants to trigger for HTML types so, mapping html.eex and html.leex to HTML in Nova -> Preferences -> Editor -> Syntax -> Custom File Types enables support now both Elixir Clips and Emmet

    Version 1.0.3

    Fixes LiveView HandleEvent syntax

    Version 1.0.2

    Update png inside extension

    Version 1.0.1

    Fixes README formatting

    Version 1.0.0

    Initial release of clips