Skip to content

IntelliSense in the editor causes modules to be loaded #715

Closed
PowerShell/PowerShellEditorServices
#1484
@pcgeek86

Description

@pcgeek86

While I'm writing PowerShell code in Visual Studio Code on Mac, I notice that messages are randomly printed to the Integrated Terminal. Those messages typically indicate that a module is being imported, and sometimes my environment will change as a result (eg. posh-git changes my prompt) against my will.

While the rich Intellisense metadata is useful for development, we should investigate a method of providing this metadata while simultaneously preventing unwanted changes to the development environment. Ideas proposed by @daviwil and myself include:

  • Add a setting that prevents automatic import of modules (or perhaps opts into it)
  • Parse tooltips from CompletionResult objects, instead of importing module
  • Run metadata gathering in separate PowerShell Runspace or process

Cheers,
Trevor Sullivan

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions