docs(readme): clarifying nvm instructions (#123)
This commit is contained in:
parent
4b63ed7b91
commit
c1c3017081
1 changed files with 17 additions and 4 deletions
21
Readme.md
21
Readme.md
|
@ -4,10 +4,6 @@ Tsserver language server extension for [coc.nvim](https://github.com/neoclide/co
|
|||
|
||||
Most of the code is from `typescript-language-features` extension which is bundled with VSCode.
|
||||
|
||||
**Note:** if you're using [nvm](https://github.com/creationix/nvm) or other
|
||||
node version manager, you need to configure `tsserver.npm` to your global npm
|
||||
executable path to avoid fetching types on vim start every time.
|
||||
|
||||
**Note:** for React to work as expected, you need your JSX filetype to be
|
||||
`javascript.jsx` and your TSX filetype to be `typescript.jsx` or
|
||||
`typescript.tsx`. In coc.nvim, these filetypes are mapped to `javascriptreact`
|
||||
|
@ -21,6 +17,23 @@ In your vim/neovim, run command:
|
|||
:CocInstall coc-tsserver
|
||||
```
|
||||
|
||||
### intructions for nvm users
|
||||
|
||||
Disable [nvm](https://github.com/creationix/nvm) with the following command:
|
||||
```
|
||||
nvm deactivate
|
||||
```
|
||||
|
||||
Next, find out what the global path of your installed version of npm with the following command:
|
||||
```
|
||||
which npm
|
||||
```
|
||||
|
||||
The output of the above command should go into the `tsserver.npm` property in your `coc-settings.json` file, a partial example listed below:
|
||||
```
|
||||
"tsserver.npm": "/usr/local/bin/npm"
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
Almost the same as VSCode.
|
||||
|
|
Loading…
Reference in a new issue