This language server assumes Node.js has been installed on the machine. To test for this open the command prompt, run the
command and check that the version number output is produced, something similar to this:
If Node.js is not installed, download and install Node.js from here
If not already installed then install TypeScript using the following command:
npm install -g typescript
Install the TypeScript Language Server usign the following command:
npm install -g typescript-language-server
With the software installed test the installation by running
typescript-language-server.cmd -h at the command line prompt, which should result in the following output:
Usage: typescript-language-server [options]
-V, --version output the version number
--stdio use stdio
--log-level <logLevel> A number indicating the log level (4 = log, 3 = info, 2 = warn, 1 =
error). Defaults to `2`.
--tsserver-log-verbosity <tsserverLogVerbosity> [deprecated] Specify a tsserver log verbosity (terse, normal,
verbose). Defaults to `normal`. example: --tsserver-log-verbosity
--tsserver-path <path> [deprecated] Specify path to tsserver.js or the lib directory.
-h, --help display help for command
If that output is not produced check the installation and also check to make sure the batch file installation folder has
been added to the system
PATH environment variable.
NOTE: Some of those options have been [deprecated] and these should not be used.
Start Zeus and use the Options, Document Types
menu to edit the TypeScript document type and in the Language Server
panel apply the following configuration settings:
Program Type: Batch
NOTE: The directory value is only required if the location of the
typescript-language-server.cmd file has not been added to the system
Using the Language Server
To test the configuration create a simple
test.ts file and fire off an auto-complete request:
The TypeScript language server can also work with a
package.json project file but the language server will need to located that file. The easiest way to achieve this is
to create a Zeus workspace in that project folder location and then leave the Root Path language server option empty. With that setup in place Zeus will automatically set the
Root Path to match the location of the currently open workspace.
Released: 27 th January 2023