Replies: 10 comments
|
This essentially boils down to a question how to send a command to micro remotely, via a socket or something. I don't think there is such a possibility, unfortunately. |
|
My knowledge of Micro is about the same as my knowledge of ricing—almost zero. Still, I had an idea you could use as a last resort. If there's no direct way to send a command to Micro, as a final option, you might be able to make Micro reload itself—maybe through an infinite reload loop or by using a file as a socket. I’m not sure how to implement this properly, but I had an idea. Once this #3733. gets merged , you could create an overlay that reloads the config continuously or read the content of a file and reload with some condition. It’s definitely not a clean solution, but I tested it and it seems to work. |
|
At least with a Lua plugin someone could implement the necessary interface and access whatever |
You mean, a plugin continuously calling Or you could do that at regular time intervals (I think you can already do that, using a timer, with A better approach would be to use something like https://pkg.go.dev/github.com/fsnotify/fsnotify... |
kinda, calling
Could you provide a short snippet or describe a bit more that approach by any chance? |
local time = import("time")
local interval = time.ParseDuration("1s")
local function periodicReload()
config.Reload()
micro.After(interval, periodicReload)
end
function init()
micro.After(interval, periodicReload)
endBTW please ignore my above suggestion to use |
Ty, that's definitely a better approach, although I've noticed when |
Sounds like a bug. |
|
You could define |
|
I opened #4239 for this. On Unix-like systems it makes It uses the full |
Uh oh!
There was an error while loading. Please reload this page.
is there a way for micro to reload dynamically or reload it via the terminal while a session is open?
I want to use matugen to dynamically change the theme but micro doesnt reload dynamically and I have to use the reload command :/
Kooha-2025-05-05-22-09-21.mp4
All reactions