-
Notifications
You must be signed in to change notification settings - Fork 511
Command and argument completions should cycle when Tab is pressed #25
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
It should work for any of these things because we're using the same PowerShell APIs to get the completion lists. Are you getting IntelliSense suggestions for cmdlets that you're typing? Can you give me a specific example that I can try? What version of Windows and PowerShell are you using? |
Make a function with parameter set in parameter Get-Item -arg <here if you try to tab it doesn't cycle through the validate set 'one' 'two' it just makes tab space > |
This currently works in VS Code with the PowerShell extension installed, you just have to hit Does that work for you if you try it? If the request is that the completion suggestions should immediately pop up without any keypress other than 'space', we can file that request against the VS Code team. |
Here is a video how much worse the tab completion is compared to ISE: Ctrl + Space works but then it opens that menu and you have to use arrow up and down on the list, you can't tab cycle through it. |
Thanks, this video is helpful and demonstrates what you're looking for really well. I'll look into how this might be possible. |
There are also lot of problem when dealing with Classes. Static methods are not listed even with Ctrl + Space it shows nothing. Public methods are listed but when you select it, it clears your variable name. See the video: https://youtu.be/GbbemOOiDnQ |
Yep, there are a couple issues around this already: #12 Can you post your example file in a Gist somewhere? It'd be useful for testing. Thanks! |
Is the completion list correct if you remove |
I doubt it. It works alright in the ISE. Still broken, even without Splatting. Good thought though! Thanks |
@pcgeek86 Thanks for that extra info. |
Would love to hear the latest on this one! Any chance of this getting addressed? |
Gotcha. I was looking at the original request, not the follow-on comments. It looks like the original request was for any type of tab completion, which works for parameters, parameter values, functions, etc. |
I think a very simple fix would be rebind |
I think we could make the ISE-style completion work with a general rebind of Tab and a new request to the language server, should be fairly straightforward. I'll take a look at it next month sometime. |
In relation to the original post, when you backspace a command, parameter, or argument, and try tab completion, it doesn't complete - just inserts a tab character, making you manually type it in. This happens in the script editor pane, whereas the Integrated Terminal does not have this problem. |
@daviwil Has there been any progress on this? It would be nice to have a setting to choose the type of tab completion you want, ISE style or current style. I prefer the ISE style as it cycles cmdlets, variables, classes, argument lists etc... |
@SeeminglyScience were you discussing this recently in Slack? Possibly with @Jaykul? |
Yeah, with @Jaykul and @0-0-1-0-1-0-1-0 actually. My thoughts on this is that it shouldn't come from us. In order to implement this we would need to essentially rewrite all of the intellisense logic that VSCode already provides. That would be a rather hefty initial chunk of work, a entire new system to maintain, and would pretty drastically change the experience of using this extension vs other language extensions. If it this change would come from somewhere, it should come from VSCode itself. That said, the ISE-style doesn't really make sense in an editor, and only really made sense at the time because it was trying to emulate the pre-PSReadLine console experience. I do understand the frustration, and I went through the same thing when I switched over to VSCode. I'd personally recommend to those who are having issues to give the current system a try long enough for your muscle memory to switch. Once you get used to using CTRL+SPACE to bring up the list of completions, you may find that it's faster and a bit less strenuous on the fingers. PSReadLine has a similar option (even with tooltips in later versions!) also bound to CTRL+SPACE, so your muscle memory should translate in the console as well. |
@0-0-1-0-1-0-1-0 given the fact that completion UX essentially happens at VSCode's layer, it might be worth opening an issue on VSCode itself. Building and maintaining a second completion stack would represent a pretty big resource drain for us |
This feature was recently implemented as an option in VS code: "editor.tabCompletion": "on" |
@MartinGC94 Thanks for that info -- really great news! Closing this issue -- if there are outstanding issues in the experience (i.e. there are missing functionalities) we can reopen. |
Tab completion doesn't work for anything (enum, validate set, parameters). It should work like in ISE so you could tab complete your enum sets and validate sets as arguments, parameters for functions and commands.
The text was updated successfully, but these errors were encountered: