-
Notifications
You must be signed in to change notification settings - Fork 234
Tab complete on ParameterAttribute property Value erases text #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yeah, there's a general class of bugs caused by the completion code in Editor Services: PowerShell/vscode-powershell#12 This is coming from the code here: https://github.com/PowerShell/PowerShellEditorServices/blob/master/src/PowerShellEditorServices.Host/LanguageServer.cs#L375 I'm using ScriptAst.FindAll to locate the token which is currently being completed. Apparently my algorithm there needs some more cases (or needs to be converted into an AstVisitor) so that I identify these cases that are currently being completed incorrectly. The idea is that I'd find the ScriptExtent of the token being completed so that I can return an edit that can be applied in the editor when the user selects that completion. If you've got an ideas on how to improve that, I'd love to hear them! |
This change resolves a general class of issues around code completions coming from the language service. The JSON protocol allows the language server to specify the range of code that will get replaced by a completion item. Previously this range was being computed incorrectly. We now use the replacement range given by the PowerShell API. This also resolves PowerShell/vscode-powershell issues 45 and 12
Fixed with commit e3d46b5 |
Thanks! |
We have switched to K&R bracing stlye and have made all 'example' style be prefixed with 'ex-' so you can still use them but know when you are getting an example-style snippet.
…tweaks Addresses issues PowerShell#62 and PowerShell#63 in snippets file.
Each description now mentions word 'snippet'.
…l-snippets More work on issue PowerShell#63, snippet improvements.
This is what I'm seeing:


If I press tab at this point, I wind up with:
:-(
The text was updated successfully, but these errors were encountered: