Bryant
November 28, 2021, 2:22am
1
This is the error i got
cmd ["typescript-language-server.cmd"] is not executable.
cmd ["typescript-language-server.cmd"] is not executable.
My config:
-- js/typescript
require'lspconfig'.tsserver.setup{
cmd = { "typescript-language-server.cmd", "--stdio" },
capabilities = capabilities,
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
}
I have tried adding the .cmd but it doesn’t work. I installed the typescript typescript-language-server
mjlbach
November 28, 2021, 2:34am
2
vscode-language-servers-extracted
does not provide tsserver. Did you read the typescript-language-server section in server_configurations.md
?
npm install -g typescript typescript-language-server
Bryant
November 28, 2021, 2:37am
3
Sorry type wrongly ahaha. I installed that
mjlbach
November 28, 2021, 2:54am
4
Ok, now what happens if you type typescript-language-server --stdio
or typescript-language-server.cmd --stdio
directly into powershell?
Bryant
November 28, 2021, 2:56am
5
typescript-language-server.cmd --stdio
typescript-language-server.cmd : The term ‘typescript-language-server.cmd’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:1
mjlbach
November 28, 2021, 2:57am
6
Ok, what about without .cmd
now
Bryant
November 28, 2021, 2:59am
7
typescript-language-server --stdio
typescript-language-server : The term ‘typescript-language-server’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.
At line:1 char:1
mjlbach
November 28, 2021, 3:01am
8
Ok, there’s your issue. Typescript-language-server is not on your path, there’s no way neovim can launch it.
Bryant
November 28, 2021, 3:02am
9
How am i going to add it? I installed it…
mjlbach
November 28, 2021, 3:09am
10
Well, you can consult general Windows documentation on how to add things to your PATH.
All I did was:
Install winget
winget install nodejs
npm i -g typescript typescript-language-server
restart powershell
typescript-language-server.cmd --stdio
on a fresh windows VM and everything worked as expected.
Bryant
November 28, 2021, 3:18am
11
as you can see the npm stuff on top is running.
my path:
HOLY COW SEE THIS:
mjlbach
November 28, 2021, 3:26am
12
I don’t understand the content of your last post
Bryant
November 28, 2021, 3:27am
13
I added the path and install tsserver. Whenever i open cmd… there is npm install prefix@latest. that happends after i add the path
Bryant
November 28, 2021, 5:13am
15
Ya but the npm thing is bugging me
mjlbach
November 28, 2021, 1:01pm
16
I don’t know what the “npm thing” is