You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using vimwiki with markdown syntax.
Have added below line in ftplugin->vimwiki.vim to override default commentstring(%%) for vimwiki:
setcommentstring=<!--\ %s\ -->
This works well and gcc adds proper comment like this:
<!-- TODOs -->
But for code blocks also it uses the same commentstring, while in markdown file it works well.
My understanding is, this plugin determines the commentstring with help of tree-sitter so I even tried setting the markdown parser for vimwiki file, and now the vimwiki files are using markdown syntax but it didn't help.
Snippet used for overriding the vimwiki tree-sitter parser:
Note: Filetype for vimwiki files is vimwiki only, I don't want to change that, because if I change that I'll loose the mapping and functionalities defined by vimwiki pluggin.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using vimwiki with
markdown
syntax.Have added below line in
ftplugin->vimwiki.vim
to override default commentstring(%%
) for vimwiki:This works well and gcc adds proper comment like this:
<!-- TODOs -->
But for code blocks also it uses the same commentstring, while in markdown file it works well.
My understanding is, this plugin determines the commentstring with help of tree-sitter so I even tried setting the
markdown
parser forvimwiki
file, and now the vimwiki files are usingmarkdown
syntax but it didn't help.Snippet used for overriding the
vimwiki
tree-sitter parser:Note: Filetype for vimwiki files is
vimwiki
only, I don't want to change that, because if I change that I'll loose the mapping and functionalities defined by vimwiki pluggin.Beta Was this translation helpful? Give feedback.
All reactions