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 communicate with vscode lsp extension? #88

Closed
KySpace opened this issue Sep 11, 2021 · 18 comments
Closed

Cannot communicate with vscode lsp extension? #88

KySpace opened this issue Sep 11, 2021 · 18 comments

Comments

@KySpace
Copy link

KySpace commented Sep 11, 2021

Showing Couldn't start client idris 2 LSP Client and Starting client failed Launching server using command ~/.idris2/bin/idris2-lsp failed..

Is there a way I can test with something other than the extension?

Environment: vscode on wsl2 debian

@ShinKage
Copy link
Contributor

Does make test return errors?

@KySpace
Copy link
Author

KySpace commented Sep 11, 2021

@ShinKage test shows successful

@andorp
Copy link
Collaborator

andorp commented Sep 11, 2021

How did you install it?

@KySpace
Copy link
Author

KySpace commented Sep 11, 2021

@andorp

I cloned the repo, went to branch idris2-0.4.0, and set the embedded idris2 repo to v0.4.0 as well. I installed idris2 with v0.4.0 and the api and lib. I went back to the idris2-lsp repo to install by make clean and make install. Basically I followed the discord guide here .

I have also tried with other commits including the most recent ones. Same issue.

@andorp
Copy link
Collaborator

andorp commented Sep 11, 2021

I assume you installed this VSCode plugin: https://github.com/bamboo/idris2-lsp-vscode.

@KySpace
Copy link
Author

KySpace commented Sep 11, 2021

@andorp Indeed

@KySpace
Copy link
Author

KySpace commented Sep 17, 2021

bamboo/idris2-lsp-vscode#5

I can make it work by modifying the path of lsp-vscode extension. It is suggested that

In that case it seems the idris2-lsp make install step might be missing something some important files.

@ShinKage
Copy link
Contributor

bamboo/idris2-lsp-vscode#5

I can make it work by modifying the path of lsp-vscode extension. It is suggested that

In that case it seems the idris2-lsp make install step might be missing something some important files.

This is very interesting to me, since the install procedure is the same for the LSP server and the compiler. Can you post the difference between the build directory and the install directory?

@KySpace
Copy link
Author

KySpace commented Sep 17, 2021

@ShinKage The install directory is ~/.idris2/bin/idris2-lsp.
The build directory is <idris2-lsp repo>/build/exec/idris2-lsp

@ShinKage
Copy link
Contributor

I was not clear. There are differences between the files and subdirectories inside the install directory and the build directory?

@KySpace
Copy link
Author

KySpace commented Sep 18, 2021

sdiff tells that idris2-lsp.so differ. The others are the same.

@andorp
Copy link
Collaborator

andorp commented Sep 18, 2021

I have a script which copies the binary to my .idris2/bin , which predates the make install , could you try if that works?

#!/bin/sh

cp ./build/exec/idris2-lsp ~/.idris2/bin/
cp -r ./build/exec/idris2-lsp_app ~/.idris2/bin/

@KySpace
Copy link
Author

KySpace commented Sep 18, 2021

where should I put this? in Makefile of the root folder? And I run make install again?

@Russoul
Copy link
Member

Russoul commented Sep 18, 2021

Paste it into a new file, without an extension. (e.g. script). The file needs to be created in the directory your LSP source resides in (the very root folder).
Then run it in a console like this: ./script. You may need to assign it an executable permission bit prior to running.
This is done like so: chmod +x ./script. The console instance has to be rooted in the LSP source folder, obviously.

@KySpace
Copy link
Author

KySpace commented Sep 18, 2021

It does not work after this when I choose the path to be /.idris2/bin/idris2-lsp.
I am pretty sure the copying is working since I deleted the original files and they appear again, and I have checked with sdiff

@michaelmesser
Copy link
Contributor

Is this still an issue?

@michaelmesser
Copy link
Contributor

Reopen if this is still an issue

@KySpace
Copy link
Author

KySpace commented Mar 5, 2022

@michaelmesser I think it is fixed now.

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

5 participants