Skip to content

Instantly share code, notes, and snippets.

@andy0130tw
Last active February 7, 2025 15:10
Show Gist options
  • Save andy0130tw/2cf46f80780dd3a9d2b7b409c5229cec to your computer and use it in GitHub Desktop.
Save andy0130tw/2cf46f80780dd3a9d2b7b409c5229cec to your computer and use it in GitHub Desktop.

How to update the bundled TypeScript package version in LSP-TypeScript in Sublime Text?

# Suppose you are at path xxx
mkdir tmp
cp ~/Library/Application\ Support/Sublime\ Text/Installed\ Packages/LSP-typescript.sublime-package .
cd tmp                                   # now at: xxx/tmp
unzip ../LSP-typescript.sublime-package  # extracts to the current dir
cd typescript-language-server            # now at: xxx/tmp/typescript-language-server

# NOTE: edit the version in the "package.json" here

npm i                                    # to update the lockfile
rm -rf node_modules                      # to remove installed files
cd ..                                    # now at: xxx/tmp
zip -r ../new.zip .                      # create the updated package
cd ..                                    # now at: xxx
cp new.zip ~/Library/Application\ Support/Sublime\ Text/Installed\ Packages/LSP-typescript.sublime-package

Now reopen Sublime Text to pick up your new settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment