local colors = require "prismite.palette" local M = {} M.base = { [""] = { fg = colors.blue }, Text = { link = "__base__" }, Method = { link = "@function.method" }, Function = { link = "@function" }, Constructor = { link = "@constructor" }, Field = { link = "@variable.member" }, Variable = { link = "@variable" }, Class = { link = "@type" }, Interface = { link = "@type" }, Module = { link = "@module" }, Property = { link = "@property" }, Unit = { link = "@constant" }, Value = { link = "__base__" }, Enum = { link = "@type" }, Keyword = { link = "@keyword" }, Snippet = { link = "__base__" }, Color = { link = "@string.special" }, File = { link = "@string.special.path" }, Reference = { link = "__base__" }, Folder = { link = "@string.special.path" }, EnumMember = { link = "@constant" }, Constant = { link = "@constant" }, Struct = { link = "@type" }, Event = { link = "@constant" }, Operator = { link = "@operator" }, TypeParameter = { link = "@parameter" }, } function M.generate(base) local ret = {} for kind, hl in pairs(M.base) do ret[base .. kind] = vim.tbl_deep_extend("force", hl, hl.link and { link = hl.link:gsub("__base__", base) } or {}) end return ret end return M