oni icon indicating copy to clipboard operation
oni copied to clipboard

Plugins doesn't seems to be working on windows

Open GabeDuarteM opened this issue 8 years ago • 10 comments

I've installed Oni and followed this tutorial to install oni-plugin-tslint, so that tslint errors get highlighted on the editor, but it doesn't seems to be working right now. What i did was:

  • cd %userprofile%
  • mkdir .oni
  • cd .oni
  • mkdir plugins
  • cd plugins
  • git clone https://github.com/extr0py/oni-plugin-tslint
  • cd oni-plugin-tslint
  • npm install
  • Open oni

After that, tslint error still didn't get caught, as you can see below when comparing to vscode:

vscode image

oni image

I tried making a plugins folder on C:\Users\gabri\AppData\Roaming\Oni as well, and installing oni-plugin-tslint there, but it didn't work too.

Am I doing something wrong?

I'm using:

  • Windows 10
  • Oni 0.3.0
  • node 9.7.1
  • npm 5.6.0

GabeDuarteM avatar Mar 11 '18 06:03 GabeDuarteM

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot avatar Mar 11 '18 06:03 oni-bot

on the Developer tools, I do see a message

[PLUGIN] Activating: oni-plugin-tslint
[PLUGIN] Activation successful.

but the plugin doesn't seem to be reporting errors

I don't know, maybe its an error at oni-plugin-tslint?

EDIT: It appears to be looking for plugins on C:\Users\gabri\AppData\Roaming\Oni\plugins, instead of C:/users/<your username> as the doc says.

GabeDuarteM avatar Mar 11 '18 06:03 GabeDuarteM

I can confirm that cloning plugins in AppData works but does not in the user directory.

Muream avatar Mar 11 '18 21:03 Muream

I'm having the same issue.

I've been trying to install the editorconfig-vim plugin on Windows, but I cant seem to get it working.
Reading through other issues (e.g. #1938 and this issue) on here I've tried the following locations: ~/.oni/plugins
~/.config/oni/plugins
%appdata$/Oni/plugins

This is what I've done for these three locations (switch out the path):

$ mkdir -p $appdata/Oni/plugins # Default appdata directory in $appdata/Oni
$ cd %appdata$/Oni/plugins
$ git clone https://github.com/editorconfig/editorconfig-vim.git

Then restart Oni and try running :help editorconfig.

Looking at the developer tools, Oni doesn't seem to be loading the plugin at all.
All I see (that i think is) related to plugins is this:

[PLUGIN] Activating: oni-plugin-statusbar
[PLUGIN] Activation successful.
[PLUGIN] Activating: oni-plugin-buffers
[PLUGIN] Activation successful.
[PLUGIN] Activating: oni-plugin-git
[PLUGIN] Activation successful.
[PLUGIN] Activating: oni-plugin-typescript
[PLUGIN] Activation successful.
[PLUGIN] Activating: oni-plugin-markdown-preview
[PLUGIN] Activation successful.

All output originating from this file: /C:/Program%20Files%20(x86)/Oni/resources/app/lib/browser/bundle.js:1

Any help with the issue would be much appreciated.

reykjalin avatar Apr 17 '18 05:04 reykjalin

I had a same issue on Windows 10.

My research about this is here:

tl;dr

We need to put plugins folder into %AppData%\Oni instead of ~\.oni.

e.g.) for user bob, oni will search plugins in C:\Users\bob\AppData\Roaming\Oni\plugins.

Current implementation

  1. oni will use plugins folder in the directory which is returned by getUserConfigFolderPath(). https://github.com/onivim/oni/blob/fec88f118699ad3ed25a5ff734fec081f067b385/browser/src/Plugins/PluginManager.ts#L43-L46
  2. getUserConfigFolderPath() returns the path of oni folder in the directory which is returned by Platform.getUserHome() https://github.com/onivim/oni/blob/409e36f747f9c5b38368ed1634794404e761781a/browser/src/Services/Configuration/UserConfiguration.ts#L27
  3. Platform.getUserHome() returns the value of APPDATA environment variable when the OS is Windows. https://github.com/onivim/oni/blob/409e36f747f9c5b38368ed1634794404e761781a/browser/src/Platform.ts#L11

In conclusion, currently, oni's user plugin directory is %AppData%\Oni\plugins.

supermomonga avatar May 08 '18 19:05 supermomonga

@GabrielDuarteM @reykjalin Does @supermomonga's comment address your issue?

badosu avatar May 21 '18 05:05 badosu

@badosu Like I noted in my comment (although I realize now it isn't very clear) I cloned the editorconfig-vim repository into the %APPDATA%\Oni\plugins directory, which is the one suggested by @supermomonga, but it didn't work.
When I try running :help editorconfig it just says E149: Sorry, no help for editorconfig and the plugin doesn't work.

reykjalin avatar May 22 '18 16:05 reykjalin

Just to check @reykjalin when you say %APPDATA%\Oni\plugins\, do you mean Oni or oni? The plugins should be stored in %APPDATA%\oni\plugins\. You'll know its the right folder since ``%APPDATA%\onicontains yourconfig.tsxandconfig.js`.

Also you can try "Help > Developer Tools" and put Oni.plugins.getAllRuntimePaths() in the console, and you should see the APPDATA path somewhere in there, plus any plugins in that folder. If you don't that may suggest a different issue.

CrossR avatar May 22 '18 16:05 CrossR

@CrossR The only folder related to Oni in %APPDATA% was Oni, so that's where I put the plugins folder. That folder (Oni) contains both config.tsx and config.js.
Unfortunately Windows treats oni and Oni as the same name, so both folders can't exist at the same time.

I tried renaming Oni to oni, but that yielded the same result.
At this point I'm starting to wonder whether editorconfig-vim has any compatibility issues with Oni?

reykjalin avatar May 22 '18 16:05 reykjalin

For me, editorconfig works with Oni both on Ubuntu and Mac (though I install it using Plug).

TalAmuyal avatar May 22 '18 21:05 TalAmuyal