Updated filter files func in blink.cmp
This commit is contained in:
parent
63f9087ac3
commit
50eba9108d
9
init.lua
9
init.lua
|
|
@ -885,14 +885,15 @@ require('lazy').setup({
|
||||||
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
||||||
providers = {
|
providers = {
|
||||||
buffer = {
|
buffer = {
|
||||||
score_offset = -1,
|
-- Make buffer compeletions appear at the end.
|
||||||
filter = function(buffer)
|
score_offset = -100,
|
||||||
-- Filetypes for which buffer completions are enabled; add filetypes to extend
|
enabled = function()
|
||||||
|
-- Filetypes for which buffer completions are enabled; add filetypes to extend:
|
||||||
local enabled_filetypes = {
|
local enabled_filetypes = {
|
||||||
'markdown',
|
'markdown',
|
||||||
'text',
|
'text',
|
||||||
}
|
}
|
||||||
local filetype = vim.bo[buffer].filetype
|
local filetype = vim.bo.filetype
|
||||||
return vim.tbl_contains(enabled_filetypes, filetype)
|
return vim.tbl_contains(enabled_filetypes, filetype)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue