-
Notifications
You must be signed in to change notification settings - Fork 25
Using the server without visiual studio? #359
Comments
Hi Marc, Not sure it will work out of the box, we may implement a sort of bootstrap. In order to be sure you have a clean install try these steps :
The process is actually running and stops without any error as it may expect to be hosted from vs-code (forked process or something like that). I've took a look at sourcegraph/javascript-typescript-langserver, it's actually supporting language server protocol and is usable outside vscode, here the way they bootstrap the server : Actually this is not on our roadmap, but if you can help us it will be highly appreciated |
At the moment the Crane language server is tightly integrated in to the client plugin, so it's not suitable for use on it's own. If you could help us split them out it would be much appreciated! |
@ichiriac Would you mind telling me the tsc version you've been using ? |
@MarcWeber, here my versions :
|
I confirm that compilation works, however there seems to be a problem with the connection. curl 'http://mawercer.de/tmp/inp' | node ... seems to fail fail and no connection.on method gets called. Haven't had time to find out what's the problem. |
already fails. process.on('message') is used in node_modules/vscode-jsonrpc/lib/messageReader.js line 250 https://nodejs.org/api/process.html#process_event_message describes the problem: If the Node.js process is spawned with an IPC channel (see the Child Process simple test case:
--stdio appears in node_modules/vscode-languageserver/lib/main.js|497| You should be able to reproduce by:
Now there are multiple things to fix But I'm unsure how to fix - maybe there are updated versions, the other What do you suggest ? |
Hi @MarcWeber, I've got it here : https://github.com/Microsoft/vscode-languageserver-node/blob/master/server/src/main.ts#L1414 In order to test it, change this line with :
And next run this from the server folder :
|
message dropped |
I got simple completion working now, but I had to patch Files.ts adding returning decoded without prefixing "/", otherwise SuggestionBuilder.prepare failed in the loop to match the filename. switch (process.platform) {
case 'darwin':
case 'linux':
if (decoded[0] == "/")
return decoded; // hack if uri is absolute path return it as is
return "/" + decoded;
case 'win32':
decoded = decoded.replace(/\//g, "\\");
return decoded;
} I'm uncertain about which features should be working. function bar();
bar() -> goto definition -> does not work
class Foo{
static public function z(){
}
}
Foo::z() -> cursor on z -> goto definition -> jumps to Foo, not to z within Foo Also updating the files contents doesn't seem to be recognized (but maybe I did something wrong). |
Completion seems to work. There is an alternative project written in TypeScript: https://github.com/bmewburn/vscode-intelephense.git crane and intelephense fail at -> at bdas which should complete adas() for instance. Or do I still miss something and those cases work for you? So editor-cells can complete with crane now. So you have a Vim backend which is still work in progress. <?php
class B{
public function bdas(){
return new A();
}
}
class A{
public function adas(){
}
}
class Fooo{
static public function zoor(){
return new A();
}
}
$x = new B();
$x->bdas()->
$x->bdas()->
$x->bdas()-> |
sorry @MarcWeber, but I don't have much time this week. I'll be back next week, but you're welcome to continue and post here your progress, it's really interesting. |
The langserver.org protocol gets used by more and more tools. I'm adding support to https://github.com/MarcWeber/editor-cells right now. But I'm running linux, npm install, removing 'exclude node_modules' form tsconfig.json and running tsc -p causes many failures, caused by not having allowJs, adding allowJs (tsc --version -> 2.3.4 causes stack overflow). Is there a version known to work?
The text was updated successfully, but these errors were encountered: