-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
How to replace default (embedded) plugins? #3029
Comments
The PR #2962 addresses the |
If ~/.config/micro/plug directory contains a plugin with the same name as a built-in plugin, the expected behavior is that the user-defined plugin in ~/.config/micro/plug is loaded instead of the built-in one. Whereas the existing behavior is that the built-in plugin is used instead of the user-defined one. Even worse, it is buggy: in this case the plugin is registered twice, so its callbacks are executed twice (e.g. with the autoclose plugin, a bracket is autoclosed with two closing brackets instead of one). Fix this by ensuring that if a plugin with the same name exists in the ~/.config/micro/plug directory, the built-in one is ignored. Fixes zyedidia#3029
Fix which makes user-defined plugins take precedence: #3031. In fact you could use a workaround in the meantime: disable the linter plugin ( |
It didn't help. I added Honestly, I am not sure that I did everything correctly because I don't know what does "rename" means...
But it doesn't work... Is it renamed? Looks like yes because "error" message that I get is the same but instead of
|
Just rename the folder, no need to rename anything inside it. I've just tried it: copied
and it works as expected, I'm not getting Also if I change it to |
Yeah, sorry it is my mistake... And thanks a lot for the help TL;DR I used the old version of the file.... Full story: As can be seen from this issue I created it after reading the #1179 issue. There was one comment #1179 (comment) in which someone embedded part of the config and it points to the old version of the config. It is obvious because github must show the same file even when master is changed... I didn't notice that it was old version and copied it. Sorry for semi wrong report. It is strange because the problem I firstly reported was real (?) even though I experienced another problem... |
…3031) If ~/.config/micro/plug directory contains a plugin with the same name as a built-in plugin, the expected behavior is that the user-defined plugin in ~/.config/micro/plug is loaded instead of the built-in one. Whereas the existing behavior is that the built-in plugin is used instead of the user-defined one. Even worse, it is buggy: in this case the plugin is registered twice, so its callbacks are executed twice (e.g. with the autoclose plugin, a bracket is autoclosed with two closing brackets instead of one). Fix this by ensuring that if a plugin with the same name exists in the ~/.config/micro/plug directory, the built-in one is ignored. Fixes #3029
The runtime dir is embedded in the binary. The way to change the files from the runtime dir is to place them in loccal folder
~/.config/micro
but it doesn't work for plugins...To change the options of linter #1179 I tried to add the modified version of linter to the local config folder with my own flags to compiler (c++20 instead of c++14"). But it doesn't work. Now each time I open micro I see the following message:
I even could accept the message if it works with new flags but it didn't really change anything. I still get the same errors like there is "c++14" flag...
Commit hash: Version: 2.0.11 (it doesn't show commit hash)
OS: Debian 12
Terminal: foot
The text was updated successfully, but these errors were encountered: