How should I package my Language Server with my cl

2019-07-18 18:16发布

问题:

I'm trying to create a language server for VSCode. It's made up of a client and a server, communicating over RPC.

The official docs have a working example, with the language-server split into in two directories, the client and the server.

What I want to do is to package both into a VSIX file, so I can install them together.

In their example, they say cd to the client directory and run vsce package. However, If I do that and install the resultant package, VSCode says

"Error: Cannot find module '/home/blah/vscode.language-client-example-0.0.1/server/server.js"

I can't run vsce package in the server directory, as it complains

"Error: Missing publisher name"

How do I package it?

回答1:

You can publish extension and try. Official doc for publishing extensions

In short for publishing, follow below steps

  1. npm install -g vsce
  2. vsce publish