sayanarijit / xplr

A hackable, minimal, fast TUI file explorer
https://xplr.dev
MIT License
4.16k stars 74 forks source link

Port xplr.fn.builtin.try_complete_path over to Rust #643

Open sayanarijit opened 1 year ago

sayanarijit commented 1 year ago

The following function should be gone:

https://github.com/sayanarijit/xplr/blob/f3a2d519b12346084f044148c4e62918c3951c30/src/init.lua#L2858

Instead, we should have something like:

    /// Try to complete the text in the input buffer at the cursor position
    /// using the given completion method(s).
    ///
    /// Type: { TryComplete = { command = bool, path = bool, options = ["strings"] } }
    ///
    /// Example:
    ///
    /// - Lua: `{ TryComplete = { command = true, path = true, options = { "foo", "bar" } } }`
    /// - YAML: `TryComplete: { command: true, path: true, options: [foo, bar] }`
    TryComplete(Completion),

See messages implementations.

Subtask of https://github.com/sayanarijit/xplr/issues/641