Skip to content

Commit

Permalink
uri added (#125)
Browse files Browse the repository at this point in the history
Co-authored-by: Saransh Saini <[email protected]>
  • Loading branch information
saranshsaini and Saransh Saini authored Sep 28, 2024
1 parent 547ee2b commit 70dd3ab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CodeiumVS/LanguageServer/LanguageServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,8 @@ public async Task<IList<CompletionItem>?>
{
await InitializeTrackedWorkspaceAsync();
}
var uri = new System.Uri(absolutePath);
var absoluteUri = uri.AbsoluteUri;
GetCompletionsRequest data =
new() { metadata = GetMetadata(),
document = new() { text = text,
Expand All @@ -801,6 +803,7 @@ public async Task<IList<CompletionItem>?>
cursor_offset = (ulong)cursorPosition,
line_ending = lineEnding,
absolute_path = absolutePath,
absolute_uri = absoluteUri,
relative_path = Path.GetFileName(absolutePath) },
editor_options = new() {
tab_size = (ulong)tabSize,
Expand Down Expand Up @@ -855,6 +858,8 @@ public async Task<IList<FunctionInfo>?>
{
await InitializeTrackedWorkspaceAsync();
}
var uri = new System.Uri(absolutePath);
var absoluteUri = uri.AbsoluteUri;
GetFunctionsRequest data =
new()
{
Expand All @@ -866,6 +871,7 @@ public async Task<IList<FunctionInfo>?>
cursor_offset = (ulong)cursorPosition,
line_ending = "\n",
absolute_path = absolutePath,
absolute_uri = absoluteUri,
relative_path = Path.GetFileName(absolutePath)
},
};
Expand All @@ -883,6 +889,8 @@ public async Task<IList<ClassInfo>?>
{
await InitializeTrackedWorkspaceAsync();
}
var uri = new System.Uri(absolutePath);
var absoluteUri = uri.AbsoluteUri;
GetClassInfosRequest data =
new()
{
Expand All @@ -894,6 +902,7 @@ public async Task<IList<ClassInfo>?>
cursor_offset = (ulong)cursorPosition,
line_ending = "\n",
absolute_path = absolutePath,
absolute_uri = absoluteUri,
relative_path = Path.GetFileName(absolutePath)
},
};
Expand Down

0 comments on commit 70dd3ab

Please sign in to comment.