Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start language server #34

Closed
repomaa opened this issue Apr 22, 2020 · 11 comments
Closed

Cannot start language server #34

repomaa opened this issue Apr 22, 2020 · 11 comments

Comments

@repomaa
Copy link

repomaa commented Apr 22, 2020

I installed the svelte-language-server package and tried running it both without arguments:

$> node_modules/.bin/svelteserver

and with --stdio

$> node_modules/.bin/svelteserver --stdio

In both cases nothing happens. The command just exits immediately without any output. Exit code is also 0.

@jasonlyu123
Copy link
Member

I assume you're referring this

const connection = process.argv.includes('--stdio')

This never gets release to npm. You would have to build from source to have this feature

@dummdidumm
Copy link
Member

What are you trying to achieve?
If you want to use the extension, install it from the extension marketplace or from inside VSCode (it's called Svelte Beta).
If you want to participate in development of the extension, follow these instructions.

@repomaa
Copy link
Author

repomaa commented Apr 24, 2020

I’m trying to use it with the vim plugin ale. It supports language server checkers/linters.

Sent with GitHawk

@dummdidumm
Copy link
Member

The svelte-language-server npm package is actually from this repo. This repo right here is the newer version of it, but we don't have an official npm package yet (@orta is that something we would want to do later?). How to run it from the command line - we don't know. There is another extension for Atom who uses the npm package which does this:

startServerProcess () {
    return super.spawnChildNode([require.resolve('svelte-language-server/bin/server.js')], {
      stdio: [null, null, null, 'ipc']
    })
  }

Maybe you have more luck with that. But apart from that, we cannot help you right now.

@davidroeca
Copy link

Another (neo)vim user here excited about the recent developments! A stable CLI released to npm would be awesome. I recently migrated my setup to CoC and there’s a svelte extension for it.

There’s also an open issue which I assume will require something like this.

@dummdidumm
Copy link
Member

dummdidumm commented Apr 24, 2020

Alright, I opened a new issue for the npm package topic.

To answer the original question: This is not doable for this repo right now, only for the old. For the old one: From what I saw in the other IDE plugins so far, the path/command to starting the server is node_modules/svelte-language-server/bin/server.js.

@jasonlyu123
Copy link
Member

About the stdio support I mention before, you could refer to the original PR jamesbirtles/svelte-language-server#38 from origin repo. It's merged after the last release.

@orta
Copy link
Contributor

orta commented Apr 26, 2020

We'll see how the deploy works tonight, but this might then be fixed

@dummdidumm
Copy link
Member

svelte-language-server package now refers to this repo and is up to date.

Could you try some of the suggested solutions and tell us if it works?

@benmccann
Copy link
Member

A CLI seems pretty easy to create if anyone wants to give it a shot: #68

@orta
Copy link
Contributor

orta commented May 28, 2020

The language-server is now regularly shipped 👍 and there's a svelte-check CLI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants