Im currently making a lightweight c#,vb ide,does anyone know how i can do c#,vb code completion and c#,vb code fixing in fastcoloredtextbox with roslyn? QUESTION: how can i get syntax errors dynamicaly from fctb text,and how i can get like ways of solving this syntax error in fctb with roslyn apis?
I already learned how to get a completions list with roslyn,but how to get a syntax errors?also i need to get that all dynamicaly(like code completions and syntax errors shows to user in fctb instantly after he entered code) You can see code down here of getting completion list from position in code
public async Task Completions(string projName,string docName,int position)
{
var document = GetDocument(projName, docName);
var completionService = CompletionService.GetService(document);
CompletionList results = await completionService.GetCompletionsAsync(document, position);
List<VNetCompletion> completions = new List<VNetCompletion>();
foreach (CompletionItem result in results.Items)
{
completions.Add(VNetCompletion.fromResult(result));
}
last_completions = completions.ToArray();
}