Skip to content

Commit a9d8e65

Browse files
616b2fglepnir
andauthored
fix(roslyn_ls): use absolute paths when open .sln and .csproj files (#3777)
* fix(roslyn_ls): use absolute paths when open `.sln` and `.csproj` files --------- Co-authored-by: glepnir <[email protected]>
1 parent f875e58 commit a9d8e65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lsp/roslyn_ls.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,17 @@ return {
129129
local root_dir = client.config.root_dir
130130

131131
-- try load first solution we find
132-
for entry, type in vim.fs.dir(root_dir) do
132+
for entry, type in fs.dir(root_dir) do
133133
if type == 'file' and vim.endswith(entry, '.sln') then
134-
on_init_sln(client, entry)
134+
on_init_sln(client, fs.joinpath(root_dir, entry))
135135
return
136136
end
137137
end
138138

139139
-- if no solution is found load project
140-
for entry, type in vim.fs.dir(root_dir) do
140+
for entry, type in fs.dir(root_dir) do
141141
if type == 'file' and vim.endswith(entry, '.csproj') then
142-
on_init_project(client, { entry })
142+
on_init_project(client, { fs.joinpath(root_dir, entry) })
143143
end
144144
end
145145
end,

0 commit comments

Comments
 (0)