microsoft / microsoft/TypeScript-Sublime-Plugin

Proposal to add a global option for typescript_tsdk

Open
#616 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
236
Avg merge
21d 13h
Merged PRs (30d)
1

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the initialize method in typescript/libs/editor_client.py and the related issue 499. Check how the plugin currently handles typescript_tsdk, then verify how npm config get prefix identifies the global TypeScript install. Done means a global setting resolves the install while existing explicit paths continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, python, typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.