diff --git a/docs/git.md b/docs/git.md index 9578e35f..ea0b00cc 100644 --- a/docs/git.md +++ b/docs/git.md @@ -38,5 +38,6 @@ Defaults to the current buffer. ```lua ---@param path? number|string buffer or path +---@return string? Snacks.git.get_root(path) ``` diff --git a/docs/picker.md b/docs/picker.md index 2b9c6156..ab870d6e 100644 --- a/docs/picker.md +++ b/docs/picker.md @@ -138,6 +138,7 @@ Snacks.picker.pick({source = "files", ...}) }, file = { filename_first = false, -- display filename before the file path + truncate = 40, -- truncate the file path to (roughly) this length }, selected = { show_always = false, -- only show the selected column when there are multiple selections @@ -457,23 +458,6 @@ Snacks.picker.pick({source = "files", ...}) ---@field cmd? string ``` -```lua ----@alias snacks.Picker.ref (fun():snacks.Picker?)|{value?: snacks.Picker} -``` - -```lua ----@class snacks.picker.Last ----@field cursor number ----@field topline number ----@field opts? snacks.picker.Config ----@field selected snacks.picker.Item[] ----@field filter snacks.picker.Filter -``` - -```lua ----@alias snacks.picker.history.Record {pattern: string, search: string, live?: boolean} -``` - ```lua ---@alias snacks.picker.Extmark vim.api.keyset.set_extmark|{col:number, row?:number, field?:string} ---@alias snacks.picker.Text {[1]:string, [2]:string?, virtual?:boolean, field?:string} @@ -550,6 +534,23 @@ It's a previewer that shows a preview based on the item data. ---@field preview? snacks.win.Config|{} preview window config ``` +```lua +---@alias snacks.Picker.ref (fun():snacks.Picker?)|{value?: snacks.Picker} +``` + +```lua +---@class snacks.picker.Last +---@field cursor number +---@field topline number +---@field opts? snacks.picker.Config +---@field selected snacks.picker.Item[] +---@field filter snacks.picker.Filter +``` + +```lua +---@alias snacks.picker.history.Record {pattern: string, search: string, live?: boolean} +``` + ## 📦 Module ```lua @@ -2104,6 +2105,8 @@ Snacks.picker.actions.toggle_preview(picker) Snacks.picker.actions.yank(_, item) ``` + + ## 📦 `snacks.picker.core.picker` ```lua @@ -2299,5 +2302,3 @@ Get the word under the cursor or the current visual selection ```lua picker:word() ``` - -