nobody-famous / alive

Common Lisp Extension for VSCode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

extension starts even in non CL projects

louisabraham opened this issue · comments

When opening any folder, the side bar focuses on Lisp image and the bottom panel focuses on the REPL.

At least, I would expect them not to get focused on automatically.

Ideally, these two should not even start (they consume resources).

Taking the python extension as example, the kernel only starts when one tries to execute a cell. The equivalent would be to provide the shortcuts of the Alive extension in Lisp windows and only start the CL environment when one of them is executed. Formatting would also activate the extension as I think it also uses the LSP.

Alternatively, one could only start the LSP when opening a Lisp file.
It looks pretty easy using onLanguage: https://code.visualstudio.com/api/references/activation-events#onLanguage

Yeah, the activation events need cleaned up. There's onWorkspaceContains, or something like that, that activates it if certain files exist in the workspace. Might also need to add a start command so that the repl can be used before any files exist, for example to use something like cl-project.

The fix above launches the extension when opening any lisp file. I found it good enough for my use case and am using it right now!

But if you don't think it fits the orientation of alive, no pressure to merge it :)

I'll merge it when I get back around to working on this project, hopefully this weekend. I keep my vscode extensions disabled and only activate them for workspaces that use them, so hadn't really hit this yet. It needs fixed, though.