Closed tylike closed 5 years ago
@tylike does AvalonEdit support the language server protocol?
If so, I can give you an example - however we start PowerShell Editor Services from within a PowerShell session.
If not, then I would recommend using the PowerShell SDK or the Windows PowerShell reference assemblies to run the .NET API to complete input using the PowerShell engine. Here's how we do it in PowerShell Editor Services:
Yeah, ScriptFile.ApplyChange
doesn't provide completions -- it changes the backend representation of the file being edited. Completions are handled elsewhere, but our project isn't going to be much use to you there; it's really geared to use the language server protocol, and if you don't use that I think you're going to have a lot of trouble getting good reuse out of it.
Instead, if the editor you're writing this for doesn't support the language server protocol, I'd recommend something like the PowerShell SDK's completions API.
Thank you very much, this is very helpful to me!
hi, I want to use avalonedit and PowerShellEditor Services to implement the intellisense function, It looks like I need to call the ScriptFile.ApplyChange method, but I don't know how to do, can you provide a small example?
thank you!