Skip to content

Commit

Permalink
refactor: created types.lua file
Browse files Browse the repository at this point in the history
  • Loading branch information
ficcdaf committed Jan 26, 2025
1 parent 2a4bdf9 commit 8979c1e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lua/ashen/theme.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
local M = {}

---@alias HighlightSpec [HexCode|ColorName?, HexCode|ColorName?, Style?] # Defines a highlight group.

---@alias Style table<string, boolean|string|integer> # Defines the text style of an AshenHighlight.

---@alias HighlightName string # The name of a Neovim highlight group.
---@alias HighlightMap table<HighlightName, HighlightSpec>

---@alias HighlightLink table<HighlightName, HighlightName> # Links first group to second group

---@type HighlightMap
M.map = {
AshenRedFlame = { "red_flame" },
Expand Down
14 changes: 14 additions & 0 deletions lua/ashen/types.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---@meta

---@alias HighlightSpec [HexCode|ColorName?, HexCode|ColorName?, Style?] # Defines a highlight group.

---@alias Style table<string, boolean|string|integer> # Defines the text style of an AshenHighlight.

---@alias HighlightName string # The name of a Neovim highlight group.
---@alias HighlightMap table<HighlightName, HighlightSpec>

---@alias HighlightLink table<HighlightName, HighlightName> # Links first group to second group
---@alias ColorName string

---@alias HexCode string # Hexadecimal color code preceded by a hashtag
---@alias Palette table<ColorName, HexCode>

0 comments on commit 8979c1e

Please sign in to comment.