obsidian.nvim icon indicating copy to clipboard operation
obsidian.nvim copied to clipboard

Usage with mdx files

Open alexandre-dos-reis opened this issue 5 months ago • 3 comments

Hi, thank you for your work. I would like to use your plugin against *.mdx files.

In my Treesitter config, I have this setting :

    vim.filetype.add({
      extension = {
        mdx = "mdx",
      },
    })
    vim.treesitter.language.register("markdown", "mdx")

I guess, I have to tweak the ft option, right ?

alexandre-dos-reis avatar Feb 03 '24 13:02 alexandre-dos-reis

Hey @alexandre-dos-reis right now there's a bunch of places in our codebase hardcoded for checking ".md" extensions. S we'd have to grep through all of those and add ".mdx". I'm happy to review a PR for this.

epwalsh avatar Feb 06 '24 03:02 epwalsh

@epwalsh Ok thank you for mentionning that. I'll try something.

alexandre-dos-reis avatar Feb 06 '24 18:02 alexandre-dos-reis

I am also interested in using ".qmd" extensions.

Mimicking Obsidian's behaviour would mean that we assume ".md" extensions in wikilinks when none are provided, but if an extension is stated explicitly use that instead. This way all text-like file types would be supported in one go, without any breaking changes.

mscott99 avatar May 03 '24 21:05 mscott99