Closed
Description
For now we are shipping a TypeScript compiler and language service along with the plugin. However, some users have the tendency to stick with certain version of TypeScript and want to use that version in the plugin. It would be good to give them the ability to configure the TypeScript version they want to use.
Current state
Currently we have a setting "typescript_proc_file" to specify path to tsserver.js
. There is no similar setting for tsc.
# retrieve the path to tsserver.js
# first see if user set the path to the file
settings = sublime.load_settings('Preferences.sublime-settings')
proc_file = settings.get('typescript_proc_file')
if not proc_file:
# otherwise, get tsserver.js from package directory
proc_file = os.path.join(PLUGIN_DIR, "tsserver", "tsserver.js")
Propose
There should be two settings "typescript_tsc_file" and "typescript_tsserver_file" with the following possible values:
- "plugin": use the tsc/tsserver shipped along with the plugin
- "global": use the tsc/tsserver in their PATH (most likely installed with NPM)
- path to executable tsc/tsserver (e.g. tsc.exe) or tsc.js/tsserver.js.