cmp-buffer
cmp-buffer copied to clipboard
Question:Multiple Buffer Sources?
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,
},
},
},
})