Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
olegklimov committed Jan 2, 2024
1 parent 9a1b66f commit 2ffd984
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions MultilineGreyText/RefactLanguageClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
using System.Windows.Controls;
using System.Windows;

// VS uses LSP in the background but doesn't play nicely with custom LSP servers for
// languages that already have a default LSP.


namespace RefactAI{

//the lsp client for refact
Expand All @@ -32,7 +36,7 @@ namespace RefactAI{
[RunOnContext(RunningContext.RunOnHost)]

public class RefactLanguageClient : ILanguageClient, ILanguageClientCustomMessage2, IDisposable{
//service provider is used to get the IVsServiceProvider which is needed for the status bar
//service provider is used to get the IVsServiceProvider which is needed for the status bar
[Import]
internal SVsServiceProvider ServiceProvider { get; set; }

Expand Down Expand Up @@ -67,7 +71,7 @@ internal JsonRpc Rpc{
//intialization options
public object InitializationOptions => null;

//files to watch
//files to watch
public IEnumerable<string> FilesToWatch => null;

//middle layer used to intercep messages to/from lsp
Expand All @@ -79,7 +83,7 @@ internal JsonRpc Rpc{
//show notification on initialize failed setting
public bool ShowNotificationOnInitializeFailed => true;

//files lsp is aware of
//files lsp is aware of
internal HashSet<String> files;

//constructor
Expand All @@ -96,10 +100,10 @@ public IEnumerable<string> ConfigurationSections{
}
}

//sends file to lsp and adds it to known file set
//sends file to lsp and adds it to known file set
public async void AddFile(String filePath, String text){

//wait for the rpc
//wait for the rpc
while (Rpc == null) await Task.Delay(1);

//dont send the file to the lsp if the lsp already knows about it
Expand Down Expand Up @@ -201,7 +205,7 @@ public Task OnServerInitializedAsync(){
return Task.CompletedTask;
}

//used to set up custom messages
//used to set up custom messages
public Task AttachForCustomMessageAsync(JsonRpc rpc){
this.Rpc = rpc;
return Task.CompletedTask;
Expand Down

0 comments on commit 2ffd984

Please sign in to comment.