Skip to content

Commit

Permalink
only strik doubled ~~ in quarto but not in markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbuhr committed Mar 14, 2024
1 parent b2c0854 commit bb53ea8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions after/queries/markdown_inline/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@
[
(shortcut_link)
] @nospell

(strikethrough
(emphasis_delimiter)
(strikethrough
(emphasis_delimiter)
(emphasis_delimiter))
(emphasis_delimiter))@markup.doublestrikethrough

6 changes: 6 additions & 0 deletions ftplugin/quarto.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ vim.wo.showbreak = '|'

-- don't run vim ftplugin on top
vim.api.nvim_buf_set_var(0, 'did_ftplugin', true)

-- markdown vs. quarto hacks
local ns = vim.api.nvim_create_namespace 'quartoHighlight'
vim.api.nvim_set_hl(ns, '@markup.strikethrough', { strikethrough = false })
vim.api.nvim_set_hl(ns, '@markup.doublestrikethrough', { strikethrough = true })
vim.api.nvim_win_set_hl_ns(0, ns)
2 changes: 1 addition & 1 deletion lua/plugins/quarto.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ return {
enabled = false,
opts = {},
},
{ 'folke/neodev.nvim', opts = {}, enabled = false },
{ 'folke/neodev.nvim', opts = {}, enabled = true },
{ 'folke/neoconf.nvim', opts = {}, enabled = false },
},
config = function()
Expand Down

0 comments on commit bb53ea8

Please sign in to comment.