marta

Function listModelHandler()

fun marta.listModelHandler(block: ListModelHandlerDeclaration)

Defines 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.rawValue
        context.activePane.view:showNotification(text, pluginId .. ".notification")
    end
}