-
Notifications
You must be signed in to change notification settings - Fork 271
JS TS Language Server
theimpostor edited this page Oct 11, 2021
·
2 revisions
This serves as a guide on how to setup a JS/TS language server for LanguageClient-neovim.
- Node.js and npm
- typescript-language-server
-
vim-javascript and vim-jsx (for
.js
and.jsx
syntax support) -
typescript-vim and vim-tsx (for
.ts
and.tsx
syntax support)
Install using npm:
npm i typescript-language-server -g
let g:LanguageClient_serverCommands = {
" other server commands...
\ 'javascript': ['typescript-language-server', '--stdio'],
\ 'typescript': ['typescript-language-server', '--stdio'],
\ 'javascript.jsx': ['typescript-language-server', '--stdio'],
\ 'typescript.tsx': ['typescript-language-server', '--stdio'],
\ }
You can configure preferences. E.g. place the following in <workspace root>/.vim/settings.json
:
{
"typescript-language-server": {
"preferences": {
"disableSuggestions": true
}
}
}