Closed tdyoshida closed 9 months ago
Chunk delimiters are not hidden here. Do you have any additional syntax plugin installed?
Thanks for your quick response!
I do use nvim-treesitter, and pictures below show the difference by enabling/disabling treesitter and zotcite.
zotcite: enabled; treesitter: enabled
zotcite: enabled; treesitter: disabled
zotcite: disabled; treesitter: enabled
zotcite: enabled; treesitter: enabled; conceallevel=0
You can see that (zotcite: disabled; treesitter: enabled) and (zotcite: enabled; treesitter: enabled; conceallevel=0) look the same, and this is what I'd like. Of course disabling zotcite is not an option, but I do want to keep treesitter too...
Sorry for bothering you for non-essential matter, but I appreciate your help!
I guessed that you were using vim-pandoc-syntax
. I didn't install it, but looking at its code, it seems that adding "inlinecode" to its conceal blacklist was necessary to avoid hiding backticks. Anyway, the option below should make zotcite set conceallevel
as you want:
let zotcite_conceallevel = 0
I do not use vim-pandoc-syntax
. I install markdown
and markdown-inline
for treesitter, but simply disabling them did not solve the problem...
Anyway, I created an autocmd with zotcite_conceallevel
, and it works perfeclty! Thank you so much!
Treesitter's syntax highlight was disabled in my init.lua
for both r
and markdown
:
require("nvim-treesitter.configs").setup({
ensure_installed = { "c", "lua", "vim", "vimdoc", "python" },
sync_install = true,
highlight = {
enable = true,
disable = { "r", "markdown", "vimdoc" },
},
indent = { enable = true,
disable = { "r", "markdown" },
},
})
But if I remove "markdown" from the disable
list, I can replicate the issue.
I'm sorry what I wrote in the previous post was incorrect.
Disabling markdown
in treesitter does make the chunk delimiters to be visible.
Personally I prefer enabling markdown
highlights, and I'll stick to use zotcite_conceallevel
option for Rmd files.
Thanks!
Thanks for the feedback. I'm closing the issue...
Now I'm understanding a bit more about how tree-sitter works. You may try to avoid the concealing of code block delimiters by creating the following file:
~/.config/nvim/queries/markdown/highlights.scm
:
;; Undo conceal of language name
(fenced_code_block
(info_string (language) @none
(#set! noconceal)))
Hi! I just started using this plugin, and so far I feel like this is what I've been looking for. One problem I have is the conceallevel. It looks like the conceallevel is set to 2 by zotcite, which works fine for markdown.
However, it also changes my Rmarkdown file to hide the chunk delimiters (```{r} and ```). It still shows the chunk label, but the end of the chunk delimiter is completely hidden.
For Rmarkdown, I'd prefer to set the conceallevel to 0. I created rmd.lua (
vim.opt.conceallevel = 0
) in ~/.config/ftplugin or tried to setup autocmd, but looks like the zotcite's setting overrides them. Now I set keymaps to change between conceallevels, which work okay, but not ideal. Is there a way to accomplish this automatically?I appreciate your help!