-
Notifications
You must be signed in to change notification settings - Fork 236
Intellisense doesn't always work for powershell #279
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
Try switching the file type from 'Plain Text' to 'PowerShell' by clicking on 'Plain Text' in the status bar. Or you can save the file with a .ps1 extension. Keep in mind that VSCode is an editor for many different languages, not just PowerShell. |
Well, it seems to work this way, but it takes intellisense like 10 seconds to kick in, is this expected? I have core i5 4200, 8gb ram, 256gb ssd... Besides the fact that its super inconvenient, can I set default to PowerShell somewhere? |
The issue with performance has been submitted and is being tracked here: PowerShell/vscode-powershell#166
Looking through VSCode settings, I don't see a setting for this. It's a good idea though. You might want to submit that to http://github.com/microsoft/vscode/issues. |
@4c74356b41 it could just be taking a little bit of time for the language service to get started up. I need to add some "Loading" text in the status bar to make sure users are aware that the language service hasn't fully loaded yet. |
well, it doesn't matter how long since vscode started. everytime you type a new commandlet (i mean, not the one not used before but any new commandlet) it won't show intellisense for like 5-10 seconds... |
Understood. Do you mind sending some logs so I can take a look? Zip up this folder and drop the zip file into the issue comment box:
|
ehm, sorry, but there's nothing in vscode directory... where should I look? |
There must be if you're using the extension :) The line I gave you was meant to be run in PowerShell, you can try checking this path directly:
Let me know if that doesn't work for you |
oh, sorry, i was looking in the application directory. |
btw, I have another PC at my work, and I observe the same behaviour. |
sorry to derail, is there an ability to launch\test\debug powershell in vscode? if so kindly point me to an article or something? |
@4c74356b41 Check out Debugging with Visual Studio Code |
thanks. <# |
Yeah, this is a limitation in VS Code currently. All code folding is done based on indentation and without any awareness of language constructs. If you indent the lines within the comment block it will be collapsible. I'm pushing them to start making progress on this soon. |
ic, any info on my logs? |
Hey @4c74356b41, looks like no verbose logs are being written out. Can you add this setting in VS Code, reproduce the issue again, and send the new logs?
Thanks! |
I think I've figured this out, sometimes PS session will crash and VSCode won't restart it |
Sometimes in VScode powershell code doesn't have intellisense at all. Sometimes for some commands, sometimes for all commands.
The text was updated successfully, but these errors were encountered: