SidOfc / mkdx

A vim plugin that adds some nice extra's for working with markdown documents
https://www.vim.org/scripts/script.php?script_id=5620
MIT License
482 stars 13 forks source link

treesitter overriding conceal settings #191

Closed Aneeqasif closed 1 year ago

Aneeqasif commented 1 year ago

OS type:

Vim:

Vim version:

NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

so i have added following lazy config

--------------------------------markdown wiki stuff --------------------------------------------------------
  {"SidOfc/mkdx",
    ft = {"markdown"},
    config = function()
      vim.cmd([[

let g:mkdx#settings     = { 'highlight': { 'enable': 0 },
\ 'enter': { 'shift': 1 },
\ 'links': { 'external': { 'enable': 1 } },
\ 'restore_visual':          0,
\ 'fold': { 'enable': 1 }, 
\ 'checkbox':  { 'toggles': [' ', '-', 'x'],
\                'update_tree': 2,
\                'initial_state': ' ',
\                'match_attrs': {
\                   'mkdxCheckboxEmpty': '',
\                   'mkdxCheckboxPending': '',
\                   'mkdxCheckboxComplete': '',
\                 }, },
\}

let g:mkdx#settings.checkbox.match_attrs = {
\ 'mkdxCheckboxEmpty': 'conceal cchar=1',
\ 'mkdxCheckboxPending': 'conceal cchar=2',
\ 'mkdxCheckboxComplete': 'conceal cchar=3',
\ }

highlight default link mkdxCheckboxPending  ErrorMsg
highlight default link mkdxCheckboxComplete ErrorMsg
highlight default link mkdxCheckboxEmpty    ErrorMsg
]])
    end
  },

but i cant see the concealling of checkboxes unless in unistall treesitter pareser for markdown and markdowninline , what can i do

SidOfc commented 1 year ago

mkdx has no "magic sauce" for this. I would think you'd be able to disable treesitter concealing but I don't know if that's possible. If uninstalling the treesitter parsers is not a problem then I'd just go with that.

The problem here is not something with mkdx either I think, since it's the other packages you're installing which are forcing themselves into your environment.

Going to close this as I think this issue should go elsewhere.