Viewed 5 times

Problem:

So, I've been using vscode primarily for go and the default experience was so nice I almost never had to dive into vscode settings to improve it. It spoiled me though.

I'm now learning powershell and I miss things like being able to hover over a custom type to see its definition, and autocompletion for things being automatically available without having to run part of a script for them to become available.

I like strongly typed programming and am creating a lot of custom classes in powershell to organize the code but whenever I go to instantiate a custom class I find myself losing time to searching for the class definition if I happened to forget what I named a property.

Question:

I'm hoping to improve the vscode powershell experience by putting completed custom classes and functions in a powershell module that is autoloaded by the workspace for the project when vscode opens. I'm thinking this will be the best way to get close to the go coding experience I've had previously where I can start calling a function or instantiate a custom class and have autocompletion available so I don't have to go searching for definitions If I happen to forget my parameter or property names.

Would that be the right way to go about addressing the issue and can be done? Or would there be a better way to go about this with powershell and vscode? I've seen suggestions to use powershell preview and vscode insider for better intellisense features in powershell but unfortunately I didn't see any difference.

Similar Questions