Skip to content

Commit

Permalink
docs: migrate to minidoc
Browse files Browse the repository at this point in the history
Closes #184
  • Loading branch information
rcarriga committed Mar 14, 2023
1 parent 281e4d7 commit 0204719
Show file tree
Hide file tree
Showing 9 changed files with 1,272 additions and 557 deletions.
485 changes: 205 additions & 280 deletions doc/nvim-notify.txt

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions lua/notify/config/init.lua
Expand Up @@ -40,19 +40,19 @@ local default_config = {
}

---@class notify.Config
---@field level string|integer: Minimum log level to display. See vim.log.levels.
---@field timeout number: Default timeout for notification
---@field max_width number | function: Max number of columns for messages
---@field max_height number | function: Max number of lines for a message
---@field stages string | function[]: Animation stages
---@field background_colour string: For stages that change opacity this is treated as the highlight behind the window. Set this to either a highlight group, an RGB hex value e.g. "#000000" or a function returning an RGB code for dynamic values
---@field icons table: Icons for each level (upper case names)
---@field on_open function: Function called when a new window is opened, use for changing win settings/config
---@field on_close function: Function called when a window is closed
---@field render function | string: Function to render a notification buffer or a built-in renderer name
---@field minimum_width integer: Minimum width for notification windows
---@field fps integer: Frames per second for animation stages, higher value means smoother animations but more CPU usage
---@field top_down boolean: whether or not to position the notifications at the top or not
---@field level string|integer Minimum log level to display. See vim.log.levels.
---@field timeout number Default timeout for notification
---@field max_width number|function Max number of columns for messages
---@field max_height number|function Max number of lines for a message
---@field stages string|function[] Animation stages
---@field background_colour string For stages that change opacity this is treated as the highlight behind the window. Set this to either a highlight group, an RGB hex value e.g. "#000000" or a function returning an RGB code for dynamic values
---@field icons table Icons for each level (upper case names)
---@field on_open function Function called when a new window is opened, use for changing win settings/config
---@field on_close function Function called when a window is closed
---@field render function|string Function to render a notification buffer or a built-in renderer name
---@field minimum_width integer Minimum width for notification windows
---@field fps integer Frames per second for animation stages, higher value means smoother animations but more CPU usage
---@field top_down boolean whether or not to position the notifications at the top or not

local opacity_warned = false

Expand Down Expand Up @@ -95,11 +95,11 @@ Defaulting to #000000]], "warn", {
end

function Config._format_default()
local lines = { "<pre>", "Default values:" }
local lines = { "Default values:", ">lua" }
for line in vim.gsplit(vim.inspect(default_config), "\n", true) do
table.insert(lines, " " .. line)
end
table.insert(lines, "</pre>")
table.insert(lines, "<")
return lines
end

Expand Down

0 comments on commit 0204719

Please sign in to comment.