File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -234,11 +234,19 @@ def run(self, _edit):
234
234
is_test = parts [1 :] == ['' ]
235
235
search_names = \
236
236
[parts [0 ] + ext for ext in ('.ex' , '.exs' )] if is_test else [file_path .stem + '_test.exs' ]
237
+ ignored_folders = ['.elixir_ls' , '_build' , 'deps' ]
238
+
239
+ subpaths = [
240
+ p
241
+ for folder in (window .folders () or [reverse_find_root_folder (file_path )]) if folder
242
+ for p in Path (folder ).iterdir ()
243
+ if p .is_file () or p .name not in ignored_folders
244
+ ]
237
245
238
246
counterpart_paths = [
239
- (folder , p )
240
- for folder in window . folders ()
241
- for p in Path ( folder ) .rglob ("*.ex*" )
247
+ (subpath , p )
248
+ for subpath in subpaths
249
+ for p in ( subpath .rglob ("*.ex*" ) if subpath . is_dir () else [ subpath ] )
242
250
if p .name in search_names
243
251
]
244
252
You can’t perform that action at this time.
0 commit comments