cmp-buffer icon indicating copy to clipboard operation
cmp-buffer copied to clipboard

Question:Multiple Buffer Sources?

Open sbock17 opened this issue 3 years ago • 0 comments

Hello, I have just successfully designed a nice buffer source with a vim regex, that is only valid for a tiny fraction of my files.

I would like to define multiple buffer sources, each with a different regex. How would I set it up?

e.g.

cmp.setup({
  sources = {
    { name = 'buffer_regex_default',
      option = {
       keyword_length = 10,
        -- Options go into this table
      },
    { name = 'buffer_regex_second',
        -- Options go into this table
      option = {       
       keyword_pattern =[[:\(\d*\l*\)]],
       keyword_length = 2,
      },
    },
  },
})

sbock17 avatar Mar 08 '22 16:03 sbock17