Update TypeScript instructions in docs
This commit is contained in:
parent
4b4f678bef
commit
76aa22886f
36
README.md
36
README.md
@ -213,8 +213,8 @@ The following additional language support options are available:
|
|||||||
`install.py`.
|
`install.py`.
|
||||||
- Go support: install [Go][go-install] and add `--go-completer` when calling
|
- Go support: install [Go][go-install] and add `--go-completer` when calling
|
||||||
`install.py`.
|
`install.py`.
|
||||||
- JavaScript and TypeScript support: install [Node.js and npm][npm-install] then
|
- JavaScript and TypeScript support: install [Node.js and npm][npm-install] and
|
||||||
install the TypeScript SDK with `npm install -g typescript`.
|
add `--ts-completer` when calling `install.py`.
|
||||||
- Rust support: install [Rust][rust-install] and add
|
- Rust support: install [Rust][rust-install] and add
|
||||||
`--rust-completer` when calling `install.py`.
|
`--rust-completer` when calling `install.py`.
|
||||||
- Java support: install [JDK8 (version 8 required)][jdk-install] and add
|
- Java support: install [JDK8 (version 8 required)][jdk-install] and add
|
||||||
@ -286,8 +286,8 @@ The following additional language support options are available:
|
|||||||
when calling `install.py`.
|
when calling `install.py`.
|
||||||
- Go support: install [Go][go-install] and add `--go-completer` when calling
|
- Go support: install [Go][go-install] and add `--go-completer` when calling
|
||||||
`install.py`.
|
`install.py`.
|
||||||
- JavaScript and TypeScript support: install [Node.js and npm][npm-install] then
|
- JavaScript and TypeScript support: install [Node.js and npm][npm-install] and
|
||||||
install the TypeScript SDK with `npm install -g typescript`.
|
add `--ts-completer` when calling `install.py`.
|
||||||
- Rust support: install [Rust][rust-install] and add `--rust-completer` when
|
- Rust support: install [Rust][rust-install] and add `--rust-completer` when
|
||||||
calling `install.py`.
|
calling `install.py`.
|
||||||
- Java support: install [JDK8 (version 8 required)][jdk-install] and add
|
- Java support: install [JDK8 (version 8 required)][jdk-install] and add
|
||||||
@ -377,8 +377,8 @@ The following additional language support options are available:
|
|||||||
Be sure that [the build utility `msbuild` is in your PATH][add-msbuild-to-path].
|
Be sure that [the build utility `msbuild` is in your PATH][add-msbuild-to-path].
|
||||||
- Go support: install [Go][go-install] and add `--go-completer` when calling
|
- Go support: install [Go][go-install] and add `--go-completer` when calling
|
||||||
`install.py`.
|
`install.py`.
|
||||||
- JavaScript and TypeScript support: install [Node.js and npm][npm-install] then
|
- JavaScript and TypeScript support: install [Node.js and npm][npm-install] and
|
||||||
install the TypeScript SDK with `npm install -g typescript`.
|
add `--ts-completer` when calling `install.py`.
|
||||||
- Rust support: install [Rust][rust-install] and add `--rust-completer` when
|
- Rust support: install [Rust][rust-install] and add `--rust-completer` when
|
||||||
calling `install.py`.
|
calling `install.py`.
|
||||||
- Java support: install [JDK8 (version 8 required)][jdk-install] and add
|
- Java support: install [JDK8 (version 8 required)][jdk-install] and add
|
||||||
@ -449,8 +449,8 @@ The following additional language support options are available:
|
|||||||
`./install.py`.
|
`./install.py`.
|
||||||
- Go support: install [Go][go-install] and add `--go-completer` when calling
|
- Go support: install [Go][go-install] and add `--go-completer` when calling
|
||||||
`./install.py`.
|
`./install.py`.
|
||||||
- JavaScript and TypeScript support: install [Node.js and npm][npm-install] then
|
- JavaScript and TypeScript support: install [Node.js and npm][npm-install] and
|
||||||
install the TypeScript SDK with `npm install -g typescript`.
|
add `--ts-completer` when calling `install.py`.
|
||||||
- Rust support: install [Rust][rust-install] and add `--rust-completer` when
|
- Rust support: install [Rust][rust-install] and add `--rust-completer` when
|
||||||
calling `./install.py`.
|
calling `./install.py`.
|
||||||
- Java support: install [JDK8 (version 8 required)][jdk-install] and add
|
- Java support: install [JDK8 (version 8 required)][jdk-install] and add
|
||||||
@ -659,9 +659,9 @@ process.
|
|||||||
- Go support: install [Go][go-install] and add it to your path. Navigate to
|
- Go support: install [Go][go-install] and add it to your path. Navigate to
|
||||||
`YouCompleteMe/third_party/ycmd/third_party/gocode` and run `go build`.
|
`YouCompleteMe/third_party/ycmd/third_party/gocode` and run `go build`.
|
||||||
|
|
||||||
- JavaScript and TypeScript support: as with the quick installation, simply
|
- JavaScript and TypeScript support: install [Node.js and npm][npm-install],
|
||||||
`npm install -g typescript` after successfully installing [Node.js and
|
navigate to `YouCompleteMe/third_party/ycmd` and run
|
||||||
npm][npm-install].
|
`npm install -g --prefix third_party/tsserver typescript`.
|
||||||
|
|
||||||
- Rust support: install [Rust][rust-install]. Navigate to
|
- Rust support: install [Rust][rust-install]. Navigate to
|
||||||
`YouCompleteMe/third_party/ycmd/third_party/racerd` and run `cargo build
|
`YouCompleteMe/third_party/ycmd/third_party/racerd` and run `cargo build
|
||||||
@ -1290,11 +1290,10 @@ installation. Further instructions on how to setup YCM with [Tern][] are
|
|||||||
available on [the wiki][tern-instructions].
|
available on [the wiki][tern-instructions].
|
||||||
|
|
||||||
All JavaScript and TypeScript features are provided by the [TSServer][] engine,
|
All JavaScript and TypeScript features are provided by the [TSServer][] engine,
|
||||||
which is included in the TypeScript SDK. To get the SDK, install [Node.js and
|
which is included in the TypeScript SDK. To enable these features, install
|
||||||
npm][npm-install] and run the command:
|
[Node.js and npm][npm-install] and call the `install.py` script with the
|
||||||
```
|
`--ts-completer` flag.
|
||||||
npm install -g typescript
|
|
||||||
```
|
|
||||||
[TSServer][] relies on [the `jsconfig.json` file][jsconfig.json] for JavaScript
|
[TSServer][] relies on [the `jsconfig.json` file][jsconfig.json] for JavaScript
|
||||||
and [the `tsconfig.json` file][tsconfig.json] for TypeScript to analyze your
|
and [the `tsconfig.json` file][tsconfig.json] for TypeScript to analyze your
|
||||||
project. Ensure the file exists at the root of your project.
|
project. Ensure the file exists at the root of your project.
|
||||||
@ -1309,11 +1308,6 @@ To get diagnostics in JavaScript, set the `checkJs` option to `true` in your
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
TypeScript 2.8.1 or later is recommended. Some features will be missing on older
|
|
||||||
versions. You can check which version you are currently using by looking at the
|
|
||||||
output of [`:YcmDebugInfo` ](#the-ycmdebuginfo-command). If the version is
|
|
||||||
`None`, your TypeScript is too old and should be updated.
|
|
||||||
|
|
||||||
### Semantic Completion for Other Languages
|
### Semantic Completion for Other Languages
|
||||||
|
|
||||||
C-family, C#, Go, Java, Python, Rust, and JavaScript/TypeScript languages are
|
C-family, C#, Go, Java, Python, Rust, and JavaScript/TypeScript languages are
|
||||||
|
@ -410,8 +410,8 @@ The following additional language support options are available:
|
|||||||
- Go support: install Go [28] and add '--go-completer' when calling
|
- Go support: install Go [28] and add '--go-completer' when calling
|
||||||
'install.py'.
|
'install.py'.
|
||||||
|
|
||||||
- JavaScript and TypeScript support: install Node.js and npm [29] then
|
- JavaScript and TypeScript support: install Node.js and npm [29] and add
|
||||||
install the TypeScript SDK with 'npm install -g typescript'.
|
'--ts-completer' when calling 'install.py'.
|
||||||
|
|
||||||
- Rust support: install Rust [30] and add '--rust-completer' when calling
|
- Rust support: install Rust [30] and add '--rust-completer' when calling
|
||||||
'install.py'.
|
'install.py'.
|
||||||
@ -488,8 +488,8 @@ The following additional language support options are available:
|
|||||||
- Go support: install Go [28] and add '--go-completer' when calling
|
- Go support: install Go [28] and add '--go-completer' when calling
|
||||||
'install.py'.
|
'install.py'.
|
||||||
|
|
||||||
- JavaScript and TypeScript support: install Node.js and npm [29] then
|
- JavaScript and TypeScript support: install Node.js and npm [29] and add
|
||||||
install the TypeScript SDK with 'npm install -g typescript'.
|
'--ts-completer' when calling 'install.py'.
|
||||||
|
|
||||||
- Rust support: install Rust [30] and add '--rust-completer' when calling
|
- Rust support: install Rust [30] and add '--rust-completer' when calling
|
||||||
'install.py'.
|
'install.py'.
|
||||||
@ -585,8 +585,8 @@ The following additional language support options are available:
|
|||||||
- Go support: install Go [28] and add '--go-completer' when calling
|
- Go support: install Go [28] and add '--go-completer' when calling
|
||||||
'install.py'.
|
'install.py'.
|
||||||
|
|
||||||
- JavaScript and TypeScript support: install Node.js and npm [29] then
|
- JavaScript and TypeScript support: install Node.js and npm [29] and add
|
||||||
install the TypeScript SDK with 'npm install -g typescript'.
|
'--ts-completer' when calling 'install.py'.
|
||||||
|
|
||||||
- Rust support: install Rust [30] and add '--rust-completer' when calling
|
- Rust support: install Rust [30] and add '--rust-completer' when calling
|
||||||
'install.py'.
|
'install.py'.
|
||||||
@ -661,8 +661,8 @@ The following additional language support options are available:
|
|||||||
- Go support: install Go [28] and add '--go-completer' when calling
|
- Go support: install Go [28] and add '--go-completer' when calling
|
||||||
'./install.py'.
|
'./install.py'.
|
||||||
|
|
||||||
- JavaScript and TypeScript support: install Node.js and npm [29] then
|
- JavaScript and TypeScript support: install Node.js and npm [29] and add
|
||||||
install the TypeScript SDK with 'npm install -g typescript'.
|
'--ts-completer' when calling 'install.py'.
|
||||||
|
|
||||||
- Rust support: install Rust [30] and add '--rust-completer' when calling
|
- Rust support: install Rust [30] and add '--rust-completer' when calling
|
||||||
'./install.py'.
|
'./install.py'.
|
||||||
@ -878,9 +878,9 @@ will notify you to recompile it. You should then rerun the install process.
|
|||||||
'YouCompleteMe/third_party/ycmd/third_party/gocode' and run 'go
|
'YouCompleteMe/third_party/ycmd/third_party/gocode' and run 'go
|
||||||
build'.
|
build'.
|
||||||
|
|
||||||
- JavaScript and TypeScript support: as with the quick installation,
|
- JavaScript and TypeScript support: install Node.js and npm [29],
|
||||||
simply 'npm install -g typescript' after successfully installing
|
navigate to 'YouCompleteMe/third_party/ycmd' and run 'npm install -g
|
||||||
Node.js and npm [29].
|
--prefix third_party/tsserver typescript'.
|
||||||
|
|
||||||
- Rust support: install Rust [30]. Navigate to
|
- Rust support: install Rust [30]. Navigate to
|
||||||
'YouCompleteMe/third_party/ycmd/third_party/racerd' and run 'cargo
|
'YouCompleteMe/third_party/ycmd/third_party/racerd' and run 'cargo
|
||||||
@ -1514,11 +1514,10 @@ installation. Further instructions on how to setup YCM with Tern [63] are
|
|||||||
available on the wiki [64].
|
available on the wiki [64].
|
||||||
|
|
||||||
All JavaScript and TypeScript features are provided by the TSServer [16]
|
All JavaScript and TypeScript features are provided by the TSServer [16]
|
||||||
engine, which is included in the TypeScript SDK. To get the SDK, install
|
engine, which is included in the TypeScript SDK. To enable these features,
|
||||||
Node.js and npm [29] and run the command:
|
install Node.js and npm [29] and call the 'install.py' script with the '--ts-
|
||||||
>
|
completer' flag.
|
||||||
npm install -g typescript
|
|
||||||
<
|
|
||||||
TSServer [16] relies on the 'jsconfig.json' file [65] for JavaScript and the
|
TSServer [16] relies on the 'jsconfig.json' file [65] for JavaScript and the
|
||||||
'tsconfig.json' file [66] for TypeScript to analyze your project. Ensure the
|
'tsconfig.json' file [66] for TypeScript to analyze your project. Ensure the
|
||||||
file exists at the root of your project.
|
file exists at the root of your project.
|
||||||
@ -1532,11 +1531,6 @@ To get diagnostics in JavaScript, set the 'checkJs' option to 'true' in your
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
<
|
<
|
||||||
TypeScript 2.8.1 or later is recommended. Some features will be missing on
|
|
||||||
older versions. You can check which version you are currently using by looking
|
|
||||||
at the output of |:YcmDebugInfo|. If the version is 'None', your TypeScript is
|
|
||||||
too old and should be updated.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
*youcompleteme-semantic-completion-for-other-languages*
|
*youcompleteme-semantic-completion-for-other-languages*
|
||||||
Semantic Completion for Other Languages ~
|
Semantic Completion for Other Languages ~
|
||||||
|
Loading…
Reference in New Issue
Block a user