marta

Function listModelHandler()

fun marta.listModelHandler(block: ListModelHandlerDeclaration)

Define a list model handler.

Example:

local pluginId = "marta.example.list.handler"

listModelHandler {
    locationChanged = function(context)
        local parent = context.activePane.model.folder
        if not parent then return end

        local text = "Location changed: " .. parent.path
        context.activePane.view:showNotification(text, pluginId .. ".notification")
    end
}