Skip to content

Commit

Permalink
Add components to Phoenix dirs (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
aptinio committed Nov 2, 2022
1 parent 2dd1e00 commit badf5dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,8 @@ defmodule ElixirLS.LanguageServer.Providers.Completion do
"plugs",
"endpoints",
"sockets",
"live"
"live",
"components"
] do
if String.ends_with?(project_web_dir, "_web") do
# by convention Phoenix doesn't use these folders as part of the module names
Expand Down
3 changes: 2 additions & 1 deletion apps/language_server/test/providers/completion_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,8 @@ defmodule ElixirLS.LanguageServer.Providers.CompletionTest do
{"MyProjectWeb.MyChannel", "channels/my_channel.ex"},
{"MyProjectWeb.MyEndpoint", "endpoints/my_endpoint.ex"},
{"MyProjectWeb.MySocket", "sockets/my_socket.ex"},
{"MyProjectWeb.MyviewLive.MyComponent", "live/myview_live/my_component.ex"}
{"MyProjectWeb.MyviewLive.MyComponent", "live/myview_live/my_component.ex"},
{"MyProjectWeb.MyComponent", "components/my_component.ex"}
]
|> Enum.each(fn {expected_module_name, partial_path} ->
path = "some/path/my_project/lib/my_project_web/#{partial_path}"
Expand Down

0 comments on commit badf5dc

Please sign in to comment.