vim-lsp-settings icon indicating copy to clipboard operation
vim-lsp-settings copied to clipboard

`:LspStatus` returns `typescript-language-server: not running`

Open OurCodeBase opened this issue 1 year ago • 10 comments

Why :LspStatus returns typescript-language-server: not running ? Please show me how to run typescript-language-server in neovim.

$ vi helloworld.js
:PlugInstall
:LspInstallServer
:LspStatus
typescript-language-server: not running

I have read closed issue #547 and included these lines to init.vim file:-

let g:lsp_diagnostics_echo_cursor = 1
let g:lsp_settings = {
\ 'efm-langserver': {
\   'disabled': v:false
\ },
\ }

autocmd BufWritePre *.js,*.jsx call execute('LspDocumentFormatSync --server=efm-langserver')

But the error still appears the same...

OurCodeBase avatar May 09 '24 01:05 OurCodeBase

Question:

  • Do it have deno.json exists on root of your project directory?
  • Do it have node_modules on root of your project directory?

mattn avatar May 09 '24 02:05 mattn

No, I'm using tsserver on a standalone script.js file. Expecting auto-completions on atleast console.log().

OurCodeBase avatar May 09 '24 15:05 OurCodeBase

Creating a folder node_modules in the same directory of my script.js file seemed to make the language server work for me.

subeenregmi avatar Jun 30 '24 19:06 subeenregmi

have same question in vim9

cheungxi avatar Sep 02 '24 03:09 cheungxi

If you want to specify language server, set

let g:lsp_settings_filetype_javascript = ['typescript-language-server']

mattn avatar Sep 02 '24 03:09 mattn

@mattn there are serveral lsp for javascript, which is the best, and why my biome running but I can't use it for formating using LspDocumentFormat command

TayTTo avatar Sep 29 '24 08:09 TayTTo

Sorry, I'm not familier to LSP for JS.

mattn avatar Sep 29 '24 23:09 mattn

@mattn tks

TayTTo avatar Sep 30 '24 02:09 TayTTo

@mattn hey bro, when I install tailwindcss-intellise, it not work when I want to use, is there any guide or special configuration for be able to use it?

TayTTo avatar Oct 08 '24 12:10 TayTTo

You can use it for svelte filetype.

mattn avatar Oct 11 '24 13:10 mattn