diff --git a/lua/elixir/projectionist/init.lua b/lua/elixir/projectionist/init.lua index 993b2de6..1aa21d2f 100644 --- a/lua/elixir/projectionist/init.lua +++ b/lua/elixir/projectionist/init.lua @@ -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",