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

VSCode extension seems not to work #485

Open
Gerhard-Piette opened this issue Apr 6, 2024 · 7 comments
Open

VSCode extension seems not to work #485

Gerhard-Piette opened this issue Apr 6, 2024 · 7 comments

Comments

@Gerhard-Piette
Copy link

Gerhard-Piette commented Apr 6, 2024

Hi,

I installed the Koka VSCode plugin in VSCode 1.88 on Windows 10 and Arch Linux.

The installation of the Koka plugin does not make VSCode ask to download the Koka compiler.
As indicated here:
koka vscode does not install compiler

I get this error when I try to execute the command "Koka : Opensamples" in VSCode.
command 'koka.openSamples' not found

I get this error when I try to install the latest compiler in VSCode:
command 'koka.installCompiler' not found.

Then I have installed the Koka compiler manually on Arch linux with this command:
curl -sSL https://github.com/koka-lang/koka/releases/download/v3.1.1/install.sh | sh
From here:
https://github.com/koka-lang/koka/releases/tag/v3.1.1

Then I have stored the compiler location in the VSCode plugin settings.
Still the same problem.

@Gerhard-Piette Gerhard-Piette changed the title Koka compiler is not installed with VSCode extension VSCode extension does not seem to work Apr 6, 2024
@Gerhard-Piette Gerhard-Piette changed the title VSCode extension does not seem to work VSCode extension seems not to work Apr 6, 2024
@TimWhiting
Copy link
Collaborator

So there are a few issues here then.

  1. There is no installation prompt on plugin install
  2. The plugin with a custom compiler location doesn't work?

As far as the first issue, I think I've seen this before, so I'll definitely look into that.
As far as the second issue, which VSCode plugin setting did you change? It should automatically find the compiler if it is on your path. I assume you are not using koka.dev.developmentPath which instructs it to look for a development clone of this repository (not an actual installed compiler), the koka.languageServer.compiler setting expects a full non-relative path to the executable including the executable name and extension (not just a path to the folder).

Are you having both issues on Windows, or just the first?

@TimWhiting
Copy link
Collaborator

TimWhiting commented Apr 7, 2024

I just found out why I was having trouble with the installation prompt on my system: Koka was configured to not disturb me with notifications for some odd reason. Try checking that? Click little bell in the bottom right and then follow through to the do-not-disturb configurations. Unintuitively, checking the box enables the notifications, while unchecking enables do-not-disturb. Depending on your settings, you might have to do this to all open windows.

Screenshot 2024-04-06 at 9 47 43 PM

@Gerhard-Piette
Copy link
Author

Gerhard-Piette commented Apr 7, 2024

Hi,

thanks for the quick reply.
I am having the same problem on Windows 10 and Arch Linux.
I do not know about the koka.dev.developmentPath and koka.languageServer.compiler.
If it is important then it would be nice to have an obvious documentation.

This is a screenshot from my terminal on Arch Linux:
Koka_terminal

These are my Koka plugin settings in VSCode.
Koka_plugin

There is no installation prompt on plugin install.

Then it would be nice to have an updated documentation.
https://koka-lang.github.io/koka/doc/book.html#sec-install-with-the-vs-code-editor
Quote:

The easiest way to start with Koka is to use the excellent [VS Code editor](https://code.visualstudio.com/) and install the Koka extension. Go to the extension panel, search for Koka and install the official extension as shown on the right.

Installing the extension also prompts to install the latest Koka compiler on your platform (available for Windows x64, MacOS x64 and arm64, and Linux x64).

Besides :

It would be nice to have a uninstall command in addition to the install command.
This is available here: https://github.com/koka-lang/koka/releases
But not here: https://koka-lang.github.io/koka/doc/book.html

It would be nice to have an obvious link to the library on the front web page. I missed it before actively searching the web web site.

Koka_library_link

@Gerhard-Piette
Copy link
Author

Gerhard-Piette commented Apr 7, 2024

I can not find the bell icon in my VSCode.

These are my notification settings.

VSCode_notifications

Still no prompts from the Koka plugin. I uninstalled and installed the Koka plugin multiple times since unchecking the Zen mode.

@TimWhiting
Copy link
Collaborator

TimWhiting commented Apr 7, 2024

The bell icon is the only thing in the lower right corner of your window (not in the settings). For whatever reason even though I wasn't in Zen mode, my Koka notifications were muted individually.

I agree that the libraries should be more prominent on the webpage. (Created a new issue for that).

There should be an uninstall command in the VSCode command window when you start typing Koka. Try running that uninstall command, remove your manual Koka > Language Server > Compiler setting (this is what I was referring to as the koka.languageServer.compiler setting - that is what it corresponds to in the json settings file), run the clear all the global state command, and try the download and install via the command menu.
Screenshot 2024-04-07 at 8 29 37 AM

Can you also open the VSCode Help->Toggle Developer Tools and post the logs that have anything to do with Koka?

@Gerhard-Piette
Copy link
Author

Gerhard-Piette commented Apr 8, 2024

Hi,

VSCode_developer_tools

The problem is the same for all : command not found.

@TimWhiting
Copy link
Collaborator

TimWhiting commented Apr 8, 2024

Do you just have a single file open? I think the extension expects to have at least one workspace folder. Try opening a folder. If this is the issue, I know where to go to try to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants