For programmatic access or custom keybindings, use the fyler.open() function. It accepts an options table.
API Options
root_path: A string representing the directory to open.kind: A string specifying how the window should be opened (e.g., "split_left_most").
Usage Examples
Basic opening
local fyler = require('fyler')
fyler.open()
Opening with specific options
-- Open as a left most split
fyler.open({ kind = "split_left_most" })
-- Open with a specific directory
fyler.open({ root_path = "~" })
Creating keymaps
local fyler = require('fyler')
-- Simple mapping
vim.keymap.set("n", "<leader>e", fyler.open, { desc = "Fyler.nvim - Open" })
-- Mapping with custom arguments via a wrapper function
vim.keymap.set(
"n",
"<leader>e",
function() fyler.open({ kind = "split_left_most" }) end,
{ desc = "Fyler.nvim - Open" }
)
local fyler = require('fyler')
fyler.open({ kind = "split_left_most" })