Skip to content

Proposal to add a global option for typescript_tsdk #616

Open
@tansongyang

Description

@tansongyang

This is somewhat related to issue 499.

Like some other users, I share user settings between machines, and the path to the global TypeScript install is different on each machine. It would be nice if I could set typescript_tsdk: global, or something similar, and the plugin would automatically look for my global install.

I'd be willing to do a pull request. It seems like you could just add another case to the initialize method in editor_client.py. It could look like this:

if tsdk_location == "global":
    # Get location of npm packages by running `npm config get prefix`
    # See https://stackoverflow.com/questions/4760215/running-shell-command-from-python-and-capturing-the-output
    # From there, get path to global TypeScript install.
    # Set variables
elif tsdk_location:
    # Keep the rest the same

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions