docs: moar docs

This commit is contained in:
Folke Lemaitre 2024-11-06 11:43:50 +01:00
parent 983621b0fe
commit 82ea3e68c4
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
18 changed files with 103 additions and 87 deletions

View file

@ -18,20 +18,19 @@ local M = setmetatable({}, {
---@field mode? string|string[]
---@class snacks.win.Config: vim.api.keyset.win_config
---@field style? string merges with config from `Snacks.config.views[view]`
---@field style? string merges with config from `Snacks.config.styles[style]`
---@field show? boolean Show the window immediately (default: true)
---@field minimal? boolean
---@field minimal? boolean Disable a bunch of options to make the window minimal (default: true)
---@field position? "float"|"bottom"|"top"|"left"|"right"
---@field buf? number
---@field file? string
---@field enter? boolean
---@field backdrop? number|false
---@field win? vim.api.keyset.win_config
---@field wo? vim.wo
---@field bo? vim.bo
---@field keys? table<string, false|string|fun(self: snacks.win)|snacks.win.Keys>
---@field on_buf? fun(self: snacks.win)
---@field on_win? fun(self: snacks.win)
---@field buf? number If set, use this buffer instead of creating a new one
---@field file? string If set, use this file instead of creating a new buffer
---@field enter? boolean Enter the window after opening (default: false)
---@field backdrop? number|false Opacity of the backdrop (default: 60)
---@field wo? vim.wo window options
---@field bo? vim.bo buffer options
---@field keys? table<string, false|string|fun(self: snacks.win)|snacks.win.Keys> Key mappings
---@field on_buf? fun(self: snacks.win) Callback after opening the buffer
---@field on_win? fun(self: snacks.win) Callback after opening the window
local defaults = {
show = true,
relative = "editor",