Skip to content

Commit

Permalink
docs: add code type documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lucobellic committed Feb 1, 2024
1 parent 42b8c95 commit 8c7b0a6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions lua/edgy-group/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ local Group = require('edgy-group')
local M = {}

---@class SelectionItem
---@field pos Edgy.Pos Position of the group
---@field index number Relative index in the group
---@field pos Edgy.Pos position of the group
---@field index number relative index in the group
---@field group EdgyGroup

-- Get a list of groups with relative index and position
Expand Down
24 changes: 12 additions & 12 deletions lua/edgy-group/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ local M = {}
local Groups = require('edgy-group.groups')

---@class EdgyGroup
---@field icon string
---@field titles string[]
---@field icon string icon used in statusline and vim.ui.select
---@field titles string[] list of titles from edgy.nvim
---@field pick_key? string Key to use for group pick.

---@class EdgyGroup.Statusline.Opts
---@field separators string[]
---@field clickable boolean
---@field colored boolean
---@field colors EdgyGroup.Statusline.Colors
---@field separators { [1]: string, [2]: string } suffix and prefix separators between icons
---@field clickable boolean enable `open_group` on click
---@field colored boolean enable highlighting support
---@field colors EdgyGroup.Statusline.Colors highlight colors for icon and pick key

---@class EdgyGroup.Statusline.Colors
---@field active string
---@field inactive string
---@field pick_active string
---@field pick_inactive string
---@field active string highlight color for open group
---@field inactive string highlight color for closed group
---@field pick_active string highlight color for pick key for open group
---@field pick_inactive string highlight color for pick key for closed group

---@class EdgyGroup.Opts
---@field groups table<Edgy.Pos, EdgyGroup[]>
---@field statusline EdgyGroup.Statusline.Opts
---@field groups table<Edgy.Pos, EdgyGroup[]> list of groups for each position
---@field statusline EdgyGroup.Statusline.Opts statusline options

---@type EdgyGroup.Opts
local default_options = {
Expand Down
4 changes: 2 additions & 2 deletions lua/edgy-group/groups.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---@class EdgyGroup.IndexedGroups
---@field selected_index number Index of the selected group
---@field groups EdgyGroup[] List of groups
---@field selected_index number index of the selected group
---@field groups EdgyGroup[] list of groups
local M = {}

---@param opts EdgyGroup.IndexedGroups?
Expand Down
2 changes: 1 addition & 1 deletion lua/edgy-group/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local Util = require('edgy.util')

-- Define groups of edgebar views by title
---@class EdgyGroups
---@field groups_by_pos table<Edgy.Pos, EdgyGroup.IndexedGroups> List of groups for each position
---@field groups_by_pos table<Edgy.Pos, EdgyGroup.IndexedGroups> list of groups for each position
local M = {}

---@param opts EdgyGroup.Opts
Expand Down
2 changes: 1 addition & 1 deletion lua/edgy-group/stl/statusline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local Group = require('edgy-group')

---@class EdgyGroup.Statusline
---@field private cache EdgyGroup.Statusline.Cache
---@field private pick_mode boolean True when pick is active, false otherwise
---@field private pick_mode boolean true when pick is active, false otherwise
------@diagnostic disable-next-line: missing-fields
local M = {}

Expand Down

0 comments on commit 8c7b0a6

Please sign in to comment.