Skip to content

Commit 872853d

Browse files
authored
fix(highlights): make linked hls set hi-default (#699)
1 parent 1873458 commit 872853d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

lua/orgmode/colors/highlights.lua

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,24 +94,25 @@ function M.link_highlights()
9494
['@org.code.delimiter'] = 'String',
9595
['@org.verbatim'] = 'String',
9696
['@org.verbatim.delimiter'] = 'String',
97-
['@org.bold'] = { bold = true, default = true },
98-
['@org.bold.delimiter'] = { bold = true, default = true },
99-
['@org.italic'] = { italic = true, default = true },
100-
['@org.italic.delimiter'] = { italic = true, default = true },
101-
['@org.strikethrough'] = { strikethrough = true, default = true },
102-
['@org.strikethrough.delimiter'] = { strikethrough = true, default = true },
103-
['@org.underline'] = { underline = true, default = true },
104-
['@org.underline.delimiter'] = { underline = true, default = true },
97+
['@org.bold'] = { bold = true },
98+
['@org.bold.delimiter'] = { bold = true },
99+
['@org.italic'] = { italic = true },
100+
['@org.italic.delimiter'] = { italic = true },
101+
['@org.strikethrough'] = { strikethrough = true },
102+
['@org.strikethrough.delimiter'] = { strikethrough = true },
103+
['@org.underline'] = { underline = true },
104+
['@org.underline.delimiter'] = { underline = true },
105105
['@org.table.delimiter'] = '@punctuation',
106106
['@org.table.heading'] = '@function',
107107
})
108108
end
109109

110110
for src, def in pairs(links) do
111111
if type(def) == 'table' then
112+
def.default = true
112113
vim.api.nvim_set_hl(0, src, def)
113114
else
114-
vim.api.nvim_set_hl(0, src, { link = def })
115+
vim.api.nvim_set_hl(0, src, { link = def, default = true })
115116
end
116117
end
117118
end

0 commit comments

Comments
 (0)