ailisp / commonlisp-vscode

Common Lisp Editing extension for Visual Studio Code
35 stars 1 forks source link

Extension Commands Not Working #4

Closed Srijan1214 closed 4 years ago

Srijan1214 commented 4 years ago

Hello,

I really do think that this will be a helpful extension. I have installed Roswell and added the ~/.roswell/bin to my $PATH. Currently, I get command not found errors whenever I try to run any commands.

For Example "Command 'Lisp: Compile And Load File' resulted in an error (command 'lisp.compileAndLoadFile' not found)".

lisp_error

Also, the autocomplete is not working.

ailisp commented 4 years ago

Hi @Srijan1214 , sorry somehow i didn't get email notification. I just tried and it still works to me, so does autocompletion. are you able to run other commonlisp-vscode commands, such as lisp repl start?

ailisp commented 4 years ago

Btw you're in Rampo College at Mahwah NJ? I used to intern there :) a very beautiful town.

Srijan1214 commented 4 years ago

@ailisp I think I did something wrong with the installation. The lisp repl start command does not work for me. lisp_error_2

Yes, I am at Ramapo College at Mahwah NJ. Really awesome that you've worked at Mahwah!

ailisp commented 4 years ago

There's a possibility your vscode version is old. Can you see:

Srijan1214 commented 4 years ago

My vscode version is 1.47.3.

Yes cl-lsp does work from the terminal.

Srijan1214 commented 4 years ago

My vscode version is 1.47.3.

Yes cl-lsp does work from the terminal.

I set the path as stated using the .bashrc. Maybe this is the issue. I'm new to linux, so I was assuming that the path set in bash should've transferred to Vscode.

ailisp commented 4 years ago

1.47 is a new version and it works to me

I set the path as stated using the .bashrc. Maybe this is the issue. I'm new to linux, so I was assuming that the path set in bash should've transferred to Vscode.

That might be the issue sorry this isn't very user friendly, at least two other people encountered this issue but the error was not yours. Try set path in ~/.profile and re-login, because setting in ~/.bashrc didn't pickup by GUI applications. Or, set this to absolute path of cl-lsp: image

I also published a new version that use ~/.roswell/bin/cl-lsp as default

smashedtoatoms commented 4 years ago

You might also try opening code from the terminal. Sometimes my zsh path doesn't make it into code, and I have to open it via the terminal to make it behave.

Srijan1214 commented 4 years ago

Sorry for the very late reply.

I just cannot seem to get this to work. Even after adding the path to .profile or running code from the terminal, the error is still persistent.

image I also tried adding the full path, but it didn't work.

ailisp commented 4 years ago

The error seems to be the vscode plugin side (commonlisp-vscode), vscode can find cl-lsp, and cl-lsp alone works on you machine but vscode cannot find any command registered by commonlisp-vscode. Do you have other lisp plugin installed, maybe there's conflicting?

On Sun, Aug 30, 2020 at 11:25 AM Srijan Joshi notifications@github.com wrote:

Sorry for the very late reply.

I just cannot seem to get this to work. Even after adding the path to .profile or running code from the terminal, the error is still persistent.

[image: image] https://user-images.githubusercontent.com/25398686/91666644-77a8ca80-eacc-11ea-9c5e-731f4f2e4142.png I also tried adding the full path, but it didn't work.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ailisp/commonlisp-vscode/issues/4#issuecomment-683453545, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFFFCCLGVSK35PQI2MITXLSDKKRBANCNFSM4PKU2BGA .

Srijan1214 commented 4 years ago

@smashedtoatoms and @ailisp. Thank you for helping me out. I started to learn slime as recommended by most people. I have tried different things but tinkering around with vscode did not help me. I also do not have any other plugin for lisp in vscode. Right now I cannot find the time to look further into this and just need to get on with lisp. So I am closing this issue. Please do not be discouraged as I am sure this is occurring because I am a novice with Linux. I will spend more time on this in the future as working on lisp inside vscode is more appealing for me than having to learn something like emacs.

Continue with the great work!

smashedtoatoms commented 4 years ago

@Srijan1214 I have one more thing for you to try if you have time. Open up the project via the cli. For example, if you have ~/example/test.lisp try:

Once the repl is running, it should behave.

PF4Public commented 3 years ago

Could it be, that cl-lsp is not allowed to be run as a shell?

This makes it work for me:

        return vscode.window.createTerminal({
            name: "Common Lisp REPL",
            shellPath: "bash",
            shellArgs: ["-c", "~/.roswell/bin/cl-lsp", "tcp", lspPort.toString()],
            hideFromUser: true,
        });
ailisp commented 3 years ago

@PF4Public 's change works, the bug was ~ isn't expand to home dir in nodejs (vscode plugin's environment). It's fixed in 0.3.2 so you'll not need to do @PF4Public's hack now

PF4Public commented 3 years ago

@ailisp It is now starting the Language Server, but sometimes (at least at the first run and under heavy load) sbcl takes more than a second to start, so the extension fails with a timeout trying to connect to it. I set 60 seconds and now all is fine:

                    setTimeout(() => {
                        reject(new Error("Connection to lsp times out"));
                    }, 60000);

60 seconds is probably an overkill though, please raise this timeout to 30 seconds or so… or 10…