filemanager-plugin icon indicating copy to clipboard operation
filemanager-plugin copied to clipboard

Micro v2 broke the plugin

Open andrewhavens opened this issue 5 years ago • 17 comments

When my cursor is over the directory that I want to make a new directory inside of and run mkdir new_dir_name and I get this error:

Lua API error: filemanager:688: bad argument #2 to Join (cannot use &{0xc0003cdbf0 0xc0000e3680 0xc000846540 true false {13802471252486016088 281212483360 0x1caf9c0} {2 2} {0 0 <nil>} false false false  false 2 0xc00065d6c0 {0 0}} (type *action.BufPane) as type string)
stack traceback:
	[G]: in function 'Join'
	filemanager:688: in function 'create_filedir'
	filemanager:800: in main chunk
	[G]: ?

Press enter to continue

andrewhavens avatar Feb 22 '20 00:02 andrewhavens

Are you on the new v2 of Micro? I'm pretty sure the update broke this plugin.

sum01 avatar Feb 22 '20 01:02 sum01

Oh, I don't know. I just did brew install micro today and have been trying it out for the first time. I'm guessing that means I'm on the latest.

andrewhavens avatar Feb 22 '20 01:02 andrewhavens

Putting https://github.com/micro-editor/updated-plugins/tree/master/filemanager-plugin in your ~/.config/micro/plug/ might work as a temporary fix, but I haven't tried it.

sum01 avatar Feb 22 '20 02:02 sum01

Using the version in the updated-plugins repo does not help.

Here's the result of opening the tree and then running the command touch test.txt.

Lua API error: filemanager:220: attempt to call a non-function object
stack traceback:
	filemanager:220: in function 'dirname_and_join'
	filemanager:691: in function 'create_filedir'
	filemanager:794: in main chunk
	[G]: ?

Press enter to continue

DevL avatar Apr 26 '20 00:04 DevL

pull request #52 should close this issue.

I have tested on mac osx and the above is fixed. If will need testing on other operating systems, but should work.

If you want to test the updated plugin, then uninstall the old filemanager plugin.

Install with git on linux or mac osx with commands below.

mkdir ~/.config/micro/plug
git clone -b microV2 https://github.com/tommyshem/filemanager-plugin.git ~/.config/micro/plug/filemanager

Or wait until it is merged into this repo

tommyshem avatar May 15 '20 05:05 tommyshem

I installed this plugin just as was suggested. But I am unable to see the tree command. Here is what I am doing.

  1. In a directory which has many files, I start my editor by running this command -micro
  2. Now the editor opens.
  3. I press Ctrl-E to go into the command mode
  4. I search for tree (there is nothing). I search for FileManager (there is nothing as well)

Please let me know if I am doing something wrong here.

Thank you for your time and patience.

gj1118 avatar May 15 '20 20:05 gj1118

@gj1118 What os are you using and terminal. Also what version of micro editor are you using, I only tested on micro editor Version: 2.0.3. Have you deleted the old plugin first, if installed. Before testing this version.

Have you got files in ~/.config/micro/plug/filemanager

If you are using windows it needs installing in a different folder. See micro editor docs for location.

Have you changed the default config folder location?

Try listing the plugins installed with this command below from within micro editor command mode. (Ctl+e)

plugin list

You should see below plugin version number if installed correctly.

filemanager (4.0.0)

I hope this helps and if you can give me the info for the above I will try and help you.

tommyshem avatar May 16 '20 01:05 tommyshem

Sorry for the late reply. My Bad.

I am on a Mac OS Mojave 10.14.6. I am using Iterm2 3.3.9 Following is my editor info micro -version Version: 2.0.2 Commit hash: c51f849 Compiled on February 26, 2020

Yes, I deleted the old plugin first. Yes, I have got files in ~/.config/micro/plug/filemanager image

No, I am not using Windows. No, I have not changed the default config folder location.

When I press Ctrl+E I can confirm that I do not see the filemanager plugin installed

image

Let me try installing that first and then I will confirm once again. Thanks for all the help. Much appreciated, kind Sir.

With Regards Gagan

gj1118 avatar May 19 '20 05:05 gj1118

OK , here is what I have done. I have updated micro to the latest version 2.0.3. I tried installing filemanager and then executed CTRL + E to show command mode and then plugin list but it is not showing me the filemanager plugin in the list. Please see the following screenshot for more information.

image

Can you please let me know what I am doing wrong here ?
PS. I have restarted micro editor after installing the filemanager plugin and then restarted micro editor to check if its installed , but I still get the same result.

Thanks

gj1118 avatar May 19 '20 06:05 gj1118

Have you tried installing another plugin to make sure micro is working correctly. like go and see if it gets listed in the plugins.

plugin install go

you might have to quit and open micro again before the plugin gets listed.

plugin list

Sorry but I can not see why it should not be working if it is in the correct plugin directory.

tommyshem avatar May 19 '20 14:05 tommyshem

Sorry it started working. Probably I was doing something wrong. Thanks.

gj1118 avatar May 24 '20 17:05 gj1118

@gj1118 I was having a similar problem (restarting micro seemed to help) but for when I try and run > tree it says it's an unknown command. I feel like I'm just missing some aspect of the syntax, so any help would be great!

flber avatar Sep 23 '20 02:09 flber

whenever i try to make a new file using touch, micro crashes for some reason

HARDIntegral avatar Jan 01 '21 02:01 HARDIntegral

Guys, I've seen that this issue keeps opened and these days I've been passing through the same, can anyone help?

FelipeSilva93 avatar Aug 09 '21 12:08 FelipeSilva93

Having this issue as well. :[

snapdeus avatar Sep 21 '21 21:09 snapdeus

Is this abandoned? 2023 and the problem still exists. Maybe the real solution is to let the micro maintainers know to drop the plugin, if its not going to be fixed.

shayneoneill avatar Jun 06 '23 04:06 shayneoneill

The issue is cloning this repo. It uses deprecated APIs. You can either install a fork or use the plugin install filemanager method. That checks the official list and downloads an updated version.

texastoland avatar Jan 19 '24 02:01 texastoland