nvim-telekasten / telekasten.nvim

A Neovim (lua) plugin for working with a markdown zettelkasten / wiki and mixing it with a journal, based on telescope.nvim
MIT License
1.34k stars 86 forks source link

Add the possibility of using more than one extension eg. {'.md', '.qmd'} [FR] #337

Open ertwro opened 2 months ago

ertwro commented 2 months ago

Please confirm

While I understand that Telekasten has its own filetype and its various abilities stem from being distinct from markdown, it still uses the markdown file extension. However, there are multiple markdown extension files, and if I want to use more than one extension, I either need another vault or have to modify my configuration each time. In the configuration file, when I set the extension type, I can only select one at a time.

    require('telekasten').setup {
      home = vim.fn.expand '~/zettelkasten', -- Put the name of your notes directory here
      -- Launch panel if nothing is typed after <leader>z
      vim.keymap.set('n', '<leader>zz', '<cmd>Telekasten panel<CR>'),
      -- Call insert link automatically when we start typing a link
      vim.keymap.set('i', '[[', '<cmd>Telekasten insert_link<CR>'),
      extension = '.md',
      -- extension = '.qmd',
      -- extension = '.rmd',
      -- extension = {'.rmd', '.md', '.qmd'},
    }

Instead of expecting a string, please allow the addition of a table. This way we can use more than one extension for the Telekasten filetype, like this.

      extension = {'.rmd', '.md', '.qmd'},

Thanks in advance.

lambtho12 commented 2 months ago

This should not be too complicated too add indeed. Although it is rather low priority for now as most contributors have little time. If you are interested, you can propose a PR and I will review it as quickly as I can.