Skip to content

Commit 958ad23

Browse files
committed
feat(extensions): add markview.nvim
1 parent 2b52b8b commit 958ad23

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/folke/lazy.nvim"> lazy.nvim</a></label></li>
7171
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/ggandor/leap.nvim"> leap.nvim</a></label></li>
7272
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/nvim-lualine/lualine.nvim"> lualine.nvim</a></label></li>
73+
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/OXY2DEV/markview.nvim"> markview.nvim</a></label></li>
7374
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/echasnovski/mini.nvim"> mini.nvim</a></label></li>
7475
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/folke/noice.nvim"> noice.nvim</a></label></li>
7576
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/hrsh7th/nvim-cmp"> nvim-cmp</a></label></li>

lua/cyberdream/config.lua

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ local M = {}
3535
---@field kubectl? boolean
3636
---@field lazy? boolean
3737
---@field leap? boolean
38+
---@field markview? boolean
3839
---@field mini? boolean
3940
---@field noice? boolean
4041
---@field notify? boolean
@@ -77,6 +78,7 @@ local default_options = {
7778
kubectl = true,
7879
lazy = true,
7980
leap = true,
81+
markview = true,
8082
mini = true,
8183
noice = true,
8284
notify = true,

lua/cyberdream/extensions/base.lua

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ function M.get(opts, t)
167167
["@markup.link.label.markdown_inline"] = { fg = t.cyan },
168168
["@markup.link.markdown_inline"] = { fg = t.blue },
169169
["@markup.link.url"] = { fg = t.blue, underline = true },
170+
["@markup.quote"] = { link = "Comment" },
170171
}
171172

172173
return highlights
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
local M = {}
2+
local util = require("cyberdream.util")
3+
4+
--- Get extension configuration
5+
--- @param opts Config
6+
--- @param t CyberdreamPalette
7+
function M.get(opts, t)
8+
opts = opts or {}
9+
local highlights = {
10+
MarkviewCol1 = { fg = t.orange, bg = util.blend(t.bg_solid, t.orange, 0.9), bold = true },
11+
MarkviewCol2 = { fg = t.cyan, bg = util.blend(t.bg_solid, t.cyan, 0.9), bold = true },
12+
MarkviewCol3 = { fg = t.blue, bg = util.blend(t.bg_solid, t.blue, 0.9), bold = true },
13+
MarkviewCol4 = { fg = t.purple, bg = util.blend(t.bg_solid, t.purple, 0.9), bold = true },
14+
MarkviewCol5 = { fg = t.magenta, bg = util.blend(t.bg_solid, t.magenta, 0.9), bold = true },
15+
MarkviewCol6 = { fg = t.green, bg = util.blend(t.bg_solid, t.green, 0.9), bold = true },
16+
17+
MarkviewLayer = { bg = util.blend(t.bgAlt, t.bgHighlight, 0.8) },
18+
MarkviewLayer2 = { bg = util.blend(t.bgAlt, t.bgHighlight, 0.8) },
19+
20+
MarkviewCol1Fg = { fg = t.red }, -- danger, bug, caution
21+
MarkviewCol2Fg = { fg = t.orange }, -- question, warning
22+
MarkviewCol3Fg = { fg = t.yellow }, -- important, custom
23+
MarkviewCol4Fg = { fg = t.cyan }, -- success, tip
24+
MarkviewCol5Fg = { fg = t.blue }, -- abstract, todo, note
25+
MarkviewCol6Fg = { fg = t.pink }, -- example
26+
MarkviewCol7Fg = { fg = t.grey }, -- quote
27+
}
28+
29+
for i = 1, 10 do
30+
highlights["MarkviewGradient" .. i] = { fg = util.blend(t.grey, t.bg_solid, i / 10) }
31+
end
32+
33+
return highlights
34+
end
35+
return M

0 commit comments

Comments
 (0)