File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -132,11 +132,25 @@ local function create_adapter(config)
132132 return false
133133 end
134134
135+ local project_dir
136+
135137 -- Filter out directories that are not part of the solution (if there is a solution)
136138 local fullpath = vim .fs .joinpath (root , rel_path )
137- local project_dir = vim .fs .root (fullpath , function (path , _ )
138- return path :match (" %.[cf]sproj$" )
139- end )
139+ for dir in vim .fs .parents (fullpath ) do
140+ if solution_dir then
141+ break
142+ end
143+
144+ for filename in vim .fs .dir (dir ) do
145+ if filename :match (" %.[cf]sproj$" ) then
146+ project_dir = dir
147+ break
148+ end
149+ end
150+ if vim .fs .normalize (dir ) == vim .fs .normalize (root ) then
151+ break
152+ end
153+ end
140154
141155 -- We cannot determine if the file is a test file without a project directory.
142156 -- Keep searching the child by not filtering it out
You can’t perform that action at this time.
0 commit comments