@@ -245,38 +245,7 @@ function initialized_notification(params::InitializedParams, server::LanguageSer
245
245
end
246
246
end
247
247
248
- # Add project files separately in case they are not in a workspace folder
249
- if server. env_path != " "
250
- for file in [" Project.toml" , " JuliaProject.toml" , " Manifest.toml" , " JuliaManifest.toml" ]
251
- file_full_path = joinpath (server. env_path, file)
252
- uri = filepath2uri (file_full_path)
253
- if isfile (file_full_path)
254
- @static if Sys. iswindows ()
255
- # Normalize drive letter to lowercase
256
- if length (file_full_path) > 1 && isletter (file_full_path[1 ]) && file_full_path[2 ] == ' :'
257
- file_full_path = lowercasefirst (file_full_path)
258
- end
259
- end
260
- # Only add again if outside of the workspace folders
261
- if all (i-> ! startswith (file_full_path, i), server. workspaceFolders)
262
- if haskey (server. _files_from_disc, uri)
263
- error (" This should not happen" )
264
- end
265
-
266
- text_file = JuliaWorkspaces. read_text_file_from_uri (uri, return_nothing_on_io_error= true )
267
- text_file === nothing && continue
268
-
269
- server. _files_from_disc[uri] = text_file
270
-
271
- if ! haskey (server. _open_file_versions, uri)
272
- JuliaWorkspaces. add_file! (server. workspace, text_file)
273
- end
274
- end
275
- # But we do want to track, in case the workspace folder is removed
276
- push! (server. _extra_tracked_files, filepath2uri (file_full_path))
277
- end
278
- end
279
- end
248
+ track_project_files! (server)
280
249
281
250
JuliaWorkspaces. set_input_fallback_test_project! (server. workspace. runtime, isempty (server. env_path) ? nothing : filepath2uri (server. env_path))
282
251
0 commit comments