Skip to content

Commit 5d07ace

Browse files
committed
add live component
1 parent 4a1fc3c commit 5d07ace

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

lua/elixir/projectionist/init.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,26 @@ local config = {
101101
"end",
102102
},
103103
},
104+
["lib/**/live/*_component.ex"] = {
105+
type = "livecomponent",
106+
alternate = "test/{dirname}/live/{basename}_component_test.exs",
107+
template = {
108+
"defmodule {dirname|camelcase|capitalize}.{basename|camelcase|capitalize}Component do",
109+
" use {dirname|camelcase|capitalize}, :live_component",
110+
"end",
111+
},
112+
},
113+
["test/**/live/*_component_test.exs"] = {
114+
type = "test",
115+
alternate = "lib/{dirname}/live/{basename}_component.ex",
116+
template = {
117+
"defmodule {dirname|camelcase|capitalize}.{basename|camelcase|capitalize}ComponentTest do",
118+
" use {dirname|camelcase|capitalize}.ConnCase",
119+
"",
120+
" import Phoenix.LiveViewTest",
121+
"end",
122+
},
123+
},
104124
["lib/**/live/*_live.ex"] = {
105125
type = "liveview",
106126
alternate = "test/{dirname}/live/{basename}_live_test.exs",

0 commit comments

Comments
 (0)