docs(appearance): added appearance tab

This commit is contained in:
DarthMooMancer
2025-05-16 12:59:53 -04:00
parent 7e047478d5
commit d5fadfa55e
5 changed files with 27 additions and 13 deletions
+5
View File
@@ -0,0 +1,5 @@
| Name | Group |
|------|-------|
| `PolydevNormal` | foreground: `NormalFloat`, background: `Normal`
| `PolydevBorder` | foreground: `Function`, background: `Normal`
| `PolydevTitle` | foreground: `FloatTitle`, background: `Normal`
+5 -1
View File
@@ -6,7 +6,6 @@ function M.setup(opts)
require("Polydev.utils").setup(opts)
vim.api.nvim_create_user_command("PolydevOpen", function() require("Polydev.ui").manager(config.get("globals").project_root) end, {})
-- require("Polydev.styles").setup_highlights()
local keys = vim.tbl_deep_extend("force", {}, config.get("globals").keybinds, opts.keybinds or {})
for key, _ in pairs(keys) do
@@ -20,6 +19,11 @@ function M.setup(opts)
require("Polydev.languages").load_language_module(filetype, opts)
end,
})
vim.api.nvim_create_autocmd("ColorScheme", {
callback = function()
require("Polydev.styles").setup_highlights()
end,
})
end
return M
+9 -5
View File
@@ -9,15 +9,19 @@ function M.setup_highlights()
end
define("PolydevNormal", {
fg = vim.api.nvim_get_hl_by_name("NormalFloat", true).foreground,
bg = vim.api.nvim_get_hl_by_name("Normal", true).background
fg = vim.api.nvim_get_hl(0, { name = "NormalFloat", link = true }).fg,
bg = vim.api.nvim_get_hl(0, { name = "Normal", link = true }).bg,
})
define("PolydevBorder", {
fg = vim.api.nvim_get_hl_by_name("Function", true).foreground,
bg = vim.api.nvim_get_hl_by_name("Normal", true).background
fg = vim.api.nvim_get_hl(0, { name = "Function", link = true }).fg,
bg = vim.api.nvim_get_hl(0, { name = "Normal", link = true }).bg,
})
define("PolydevTitle", {
fg = vim.api.nvim_get_hl(0, { name = "FloatTitle", link = true }).fg, bold = true,
bg = vim.api.nvim_get_hl(0, { name = "Normal", link = true }).bg,
})
define("PolydevTitle", { fg = "#89dceb", bold = true })
end
return M
+7 -7
View File
@@ -67,10 +67,10 @@ function M.manager(project_root)
local current_view = vim.deepcopy(entries)
-- Create a new custom highlight group with Normal background and NormalFloat foreground
vim.api.nvim_set_hl(0, "PolydevNormal", {
fg = vim.api.nvim_get_hl(0, { name = "NormalFloat", link = true }).fg,
bg = vim.api.nvim_get_hl(0, { name = "Normal", link = true }).bg,
})
-- vim.api.nvim_set_hl(0, "PolydevNormal", {
-- fg = vim.api.nvim_get_hl(0, { name = "NormalFloat", link = true }).fg,
-- bg = vim.api.nvim_get_hl(0, { name = "Normal", link = true }).bg,
-- })
local popup, search, preview = Popup({
enter = true,
@@ -82,7 +82,7 @@ function M.manager(project_root)
position = "50%",
buf_options = { modifiable = true, readonly = false },
win_options = {
winhighlight = "Normal:PolydevNormal,FloatBorder:Function",
winhighlight = "Normal:PolydevNormal,FloatBorder:PolydevBorder,FloatTitle:PolydevTitle",
}
}), Popup({
enter = false,
@@ -93,7 +93,7 @@ function M.manager(project_root)
},
buf_options = { modifiable = true, readonly = false },
win_options = {
winhighlight = "Normal:PolydevNormal,FloatBorder:Function",
winhighlight = "Normal:PolydevNormal,FloatBorder:PolydevBorder,FloatTitle:PolydevTitle",
}
}), Popup({
enter = false,
@@ -105,7 +105,7 @@ function M.manager(project_root)
position = "50%",
buf_options = { modifiable = true, readonly = false },
win_options = {
winhighlight = "Normal:PolydevNormal,FloatBorder:Function",
winhighlight = "Normal:PolydevNormal,FloatBorder:PolydevBorder,FloatTitle:PolydevTitle",
}
})
local layout = Layout({
+1
View File
@@ -4,6 +4,7 @@ nav:
- Installation: installation.md
- Setup: setup.md
- Language Reference: languages.md
- Appearance: appearance.md
theme:
name: material