0

sals.place · 16d · discuss

Since diving back into [Neo]vim, I’ve been working with my Obsidian vault from the terminal. One feature I’ve been missing from the Obsidian app is text highlighting: text surrounded by two equals signs, ==like this==, gets a highlighter effect. Turns out this is super easy to add to Neovim (and probably Vim too, but haven’t gotten there yet). The config looks like this: -- Define the syntax match for text between == vim.cmd([[ syntax match markdownHighlight /==.\{-}==/ ]]) -- Define the styling vim.api.nvim_set_hl(0, "markdownHighlight", { bg = "#3c3836", fg = "#fabd2f", bold = true, }) And here’s the result: