File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
apps/language_server/lib/language_server/providers Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -52,12 +52,15 @@ defmodule ElixirLS.LanguageServer.Providers.Formatting do
52
52
def should_format? ( file_uri , project_dir , inputs ) when is_list ( inputs ) do
53
53
file = String . trim_leading ( file_uri , "file://" )
54
54
55
- Enum . any? ( inputs , fn glob ->
56
- project_dir
57
- |> Path . join ( glob )
58
- |> Path . wildcard ( match_dot: true )
59
- |> Enum . any? ( & ( file == & 1 ) )
55
+ inputs
56
+ |> Stream . flat_map ( fn glob ->
57
+ [
58
+ Path . join ( [ project_dir , glob ] ) ,
59
+ Path . join ( [ project_dir , "apps" , "*" , glob ] )
60
+ ]
60
61
end )
62
+ |> Stream . flat_map ( & Path . wildcard ( & 1 , match_dot: true ) )
63
+ |> Enum . any? ( & ( file == & 1 ) )
61
64
end
62
65
63
66
def should_format? ( _file_uri , _project_dir , _inputs ) , do: true
You can’t perform that action at this time.
0 commit comments