Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge multiple sources of one filetype into single output? #25

Open
zhengpd opened this issue Apr 17, 2023 · 0 comments
Open

merge multiple sources of one filetype into single output? #25

zhengpd opened this issue Apr 17, 2023 · 0 comments

Comments

@zhengpd
Copy link

zhengpd commented Apr 17, 2023

It seems multiple sources in one template would not be merged for the same filetype. For example, following config only keeps lua.snippets content from either vim-snippets/snippets or vim-snippets/UltiSnips, but no both.

      templates = {
        {
          name = '1',
          sources = { snipmate = { './vim-snippets/snippets' }, ultisnips = { './vim-snippets/UltiSnips' }  },
          output = {
            snipmate = {
              vim.fn.stdpath('data') .. '/snippet-converter/snippets-1'
            }
          }
        },
    }

So I have to create separate templates and separate outputs like below:

      templates = {
        {
          name = '1',
          sources = { snipmate = { './vim-snippets/snippets' } },
          output = {
            snipmate = {
              vim.fn.stdpath('data') .. '/snippet-converter/snippets-1'
            }
          }
        },
        {
          name = '2',
          sources = { ultisnips = { './vim-snippets/UltiSnips' } },
          output = {
            snipmate = {
              vim.fn.stdpath('data') .. '/snippet-converter/snippets-2'
            }
          }
        },
    }

It could be convenient if snippets from sources in single template could be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant