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

Extension unable to connect #13

Open
chinepun opened this issue Aug 30, 2023 · 3 comments
Open

Extension unable to connect #13

chinepun opened this issue Aug 30, 2023 · 3 comments
Assignees
Labels
bug Something isn't working valid

Comments

@chinepun
Copy link

Despite Lapcord installed globally, the extension is unable to connect. Below is the screenshot of the log file. I am currently on POP OS 22.04.

lapcord

@jesus-ale43 jesus-ale43 added bug Something isn't working help wanted Extra attention is needed labels Sep 3, 2023
@jesus-ale43 jesus-ale43 moved this to In Progress in Lapcord (Server/Extension) Sep 3, 2023
@hyduez
Copy link
Member

hyduez commented Sep 4, 2023

Sorry for taking so long. Yes, the error is because there is no idle object in options, which inherits from params.initializationOptions. It's a bit complicated to explain how we missed that simple error, but thanks for opening an issue.

The Lapce proxy is a bit confusing to understand, but I'll try to be as simple as possible. Suppose you install an extension, its parameters are intact, i.e. its configuration, how does the Lapce proxy send to the extension those parameters? Through an object, but here comes its particularity, it only sends the properties that have been manipulated at least once. You get the idea, when you install a new extension, you have never manipulated its parameters, so, guess how Lapce sends the object? Exactly, empty. That's when the code goes into chaos.

Obviously, as we had been testing several configurations, the object that Lapce sent us was complete, with each of the parameters, so we didn't have that inconvenience.

If you iterate all the configuration parameters the extension will work. But of course, we understand that this is annoying and we will be working on a solution.

Thanks again!

@hyduez
Copy link
Member

hyduez commented Sep 4, 2023

Additionally, I am aware of your proposal. From what I understood, you suggested that the lapcord binaries (lsp) be located in the $HOME path and that the command to run be ts-node --swc ~$HOME/.lapcord/src --stdio, i.e., compile in a different location when installing the extension? To be honest I don't understand 100% the functionality of that.

@hyduez hyduez added valid and removed help wanted Extra attention is needed labels Sep 4, 2023
@chinepun
Copy link
Author

chinepun commented Sep 4, 2023

The suggestion i proposed eliminates the use of installing lapcord binary provided ts-node is installed globally, all it does is transfer the files in the src/ folder to a new folder $HOME/.lapcord/src.
Currently the plugin runs lapcord --stdio in the background so the solution i proposed is to convert the plugin to run ts-node $HOME/.lapcord/src --stdio(--swc is not necessary) in the background.

@hyduez hyduez pinned this issue Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working valid
Projects
Status: In Progress
Development

No branches or pull requests

3 participants