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

Installed Extensions not running #3215

Closed
HakKet opened this issue Mar 3, 2021 · 2 comments
Closed

Installed Extensions not running #3215

HakKet opened this issue Mar 3, 2021 · 2 comments
Labels
A-extension Area: Extension/plugin integration, vscode or VimL bug Something isn't working

Comments

@HakKet
Copy link

HakKet commented Mar 3, 2021

Hi,

I am using Onivim 2 version 0.5.9-nightly on Windows 10
I have installed all of the 3 extensions by using the command oni2 --install-extension.

The extensions installed are :

  • Live Server - Ritwick Day,
  • open in browser - techer,
  • jumpy - wmaurer

I can see all of them in the Extensions pane and their commands seem also available (CTRL+shift+P).

None of the extensions are working.

PS: The result of oni2 -f --quiet is enclosed as text file

oni2_20210303_1545.txt

@bryphe
Copy link
Member

bryphe commented Mar 6, 2021

Hi @HakKet ,

Thanks for logging the issue. Taking a look through some of the extensions - they expose some missing APIs:

  1. Live Server
  • Our $findInFiles implementation isn't respecting the max count - so we end up traversing further than needed (blocks the status bar from loading the Go Live item)
  • Our $findInFiles implementation will return an error if a stat call fails, which isn't correct
  • The vscode.workspace.saveAll API wasn't implemented
  1. Open in browser

The open in browser extension wasn't being activated as expected - Onivim wasn't sending a proper activation event in this case, when the command was being executed. This actually may be the same issue affecting #3238

  1. The jumpy plugin relies on implementing the text decoration API - looking at tracking here: Extension: Text Decoration API #3189

I'll use this issue to track fixes for 1) and 2) though - 1) is related to a PR I just opened recently: #3225

@bryphe bryphe added A-extension Area: Extension/plugin integration, vscode or VimL bug Something isn't working labels Mar 6, 2021
bryphe added a commit that referenced this issue Mar 8, 2021
…dFiles API (#3241)

__Issue:__ Some extensions that use the `vscode.workspace.findFiles` API wouldn't work as expected - like the [Live Server](https://open-vsx.org/extension/ritwickdey/LiveServer) extension.

__Defect:__ The `maxCount` argument wasn't being used by Onivim - so for a very large folder, we might not finish traversing for a while. In addition, the `readdir` call could fail, in which case no result would be returned at at all.
 
__Fix:__ Implement handling of `maxCount`, and short-circuit the find-in-files once the limit is reached. This fixes the first blocking issue for #3215
bryphe added a commit that referenced this issue Mar 8, 2021
This fixes part 2 of #3215 - the live-server extension has an `await vscode.workspace.saveAll()` call, which Onivim was currently not handling - since this promise never returned, the extension would not start the session.
bryphe added a commit that referenced this issue Mar 10, 2021
__Issue:__ In #3215 , the [open in browser](https://github.com/SudoKillMe/vscode-extensions-open-in-browser) plugin is not working as expected.

__Defect:__ The extension is activated via `onCommand` events - https://github.com/SudoKillMe/vscode-extensions-open-in-browser/blob/6a0972f8019ba26f7ac2cc3a184a3e3ca44b4940/package.json#L21 

Onivim wasn't sending the appropriate `onCommand` events when triggering the open in default browser / open in specific browser actions, and therefore, they would never be handled by the extension.

__Fix:__ If the activation event for a command hasn't been sent, send it before executing the contributed command. Add a test case to validate this functionality.
@HakKet
Copy link
Author

HakKet commented Mar 11, 2021

Closing this issue.
Thank you.

@HakKet HakKet closed this as completed Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-extension Area: Extension/plugin integration, vscode or VimL bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants