Skip to content

Add leex/heex to projectionist #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
26 changes: 20 additions & 6 deletions lua/elixir/projectionist/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,40 @@ local config = {
"end",
},
},
["lib/**/live/*_live.ex"] = {
["lib/**/live/*.ex"] = {
type = "liveview",
alternate = "test/{dirname}/live/{basename}_live_test.exs",
alternate = "test/{dirname}/live/{basename}_test.exs",
template = {
"defmodule {dirname|camelcase|capitalize}.{basename|camelcase|capitalize}Live do",
"defmodule {dirname|camelcase|capitalize}.{basename|camelcase|capitalize} do",
" use {dirname|camelcase|capitalize}, :live_view",
"end",
},
},
["test/**/live/*_live_test.exs"] = {
["test/**/live/*_test.exs"] = {
type = "test",
alternate = "lib/{dirname}/live/{basename}_live.ex",
alternate = "lib/{dirname}/live/{basename}.ex",
template = {
"defmodule {dirname|camelcase|capitalize}.{basename|camelcase|capitalize}LiveTest do",
"defmodule {dirname|camelcase|capitalize}.{basename|camelcase|capitalize}Test do",
" use {dirname|camelcase|capitalize}.ConnCase",
"",
" import Phoenix.LiveViewTest",
"end",
},
},
["lib/**/live/*.html.leex"] = {
type = "leex",
alternate = "test/{dirname}/live/{basename}_test.exs",
template = {
"",
},
},
["lib/**/live/*.html.heex"] = {
type = "heex",
alternate = "test/{dirname}/live/{basename}_test.exs",
template = {
"",
},
},
["lib/**/channels/*_channel.ex"] = {
type = "channel",
alternate = "test/{dirname}/channels/{basename}_channel_test.exs",
Expand Down