From 316403ad1cbb665e7838f596384d44b1649f6c1b Mon Sep 17 00:00:00 2001 From: Tom <75736384+0x546F6D@users.noreply.github.com> Date: Tue, 26 Dec 2023 18:00:56 +0300 Subject: [PATCH] feat(concealer): add ability to disable spell checking in code blocks --- lua/neorg/modules/core/concealer/module.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/neorg/modules/core/concealer/module.lua b/lua/neorg/modules/core/concealer/module.lua index 98a61e7da..cbcd0dbd4 100644 --- a/lua/neorg/modules/core/concealer/module.lua +++ b/lua/neorg/modules/core/concealer/module.lua @@ -628,6 +628,7 @@ module.public = { virt_text = not to_eol and { { (" "):rep(mark_col_end_0bex - len), config.highlight } } or nil, virt_text_pos = "overlay", virt_text_win_col = len, + spell = config.spell_check, }) else vim.api.nvim_buf_set_extmark(bufid, module.private.ns_icon, row_0b, len, { @@ -641,6 +642,7 @@ module.public = { }, virt_text_pos = "overlay", virt_text_win_col = len, + spell = config.spell_check, }) end end @@ -951,6 +953,9 @@ module.config.public = { -- block. conceal = false, + -- If `false` will disable spell check on code blocks when 'spell' option is switched on. + spell_check = true, + nodes = { "ranged_verbatim_tag" }, highlight = "@neorg.tags.ranged_verbatim.code_block", render = module.public.icon_renderers.render_code_block,