-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.lua
42 lines (35 loc) · 1.14 KB
/
config.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---@alias ColorSpec string RGB Hex string
---@alias ColorTable table<string, ColorSpec>
---@alias KanagawaColorsSpec { palette: ColorTable, theme: ColorTable }
---@alias KanagawaColors { palette: PaletteColors, theme: ThemeColors }
local M = {}
---@class KanagawaConfig
local defaults = {
undercurl = true,
transparent = false,
gutter = false,
dimInactive = true, -- disabled when transparent
terminalColors = true,
commentStyle = { italic = true },
functionStyle = { italic = false },
keywordStyle = { italic = false, bold = false },
statementStyle = { italic = false, bold = false },
typeStyle = { italic = false },
colors = { theme = {}, palette = {} },
---@type fun(colors: KanagawaColorsSpec): table<string, table>
overrides = function()
return {}
end,
}
---@type KanagawaConfig
M.options = {}
---@param options? KanagawaConfig user configuration
function M.setup(options)
M.options = vim.tbl_deep_extend("force", {}, defaults, options or {})
end
---@param options? KanagawaConfig user configuration
function M.extend(options)
M.options = vim.tbl_deep_extend("force", {}, M.options or defaults, options or {})
end
M.setup()
return M