iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.82k stars 284 forks source link

HELP NEEDED: How do i add ReSt/x-rst/reStructuredText to the config? #662

Closed ojsef39 closed 7 months ago

ojsef39 commented 7 months ago

Hey, any help would be highly appreciated, and please excuse my stupidity. i'm new to lazyvim.

I have the following in /lua/plugins/markdown-preview.lua

return {
  {
    "iamcco/markdown-preview.nvim",
    event = "BufRead",
    ft = { "markdown", "x-rst" }, 
    build = function()
      vim.fn["mkdp#util#install"]()
    end,
  },
}

I've tried: "reStructuredText", "x-rst", "rst", "ReSt" but all of them didn't work, i also tried writing them in a single string with and without {}

I think it's possible to do some way, but im not able to find out how, since someone asked here for an enhancment to rst tables.

Thanks in advance to anyone who can help me out!!

ojsef39 commented 7 months ago

Solution:

return {
  {
    "iamcco/markdown-preview.nvim",
    lazy = true,
    ft = { "markdown", "rst" },
    build = function()
      vim.fn["mkdp#util#install"]()
    end,
    config = function()
      vim.g.mkdp_filetypes = { "markdown", "rst" }
    end,
  },
}