Updated filter files func in blink.cmp

This commit is contained in:
MN-nagy 2025-07-14 00:11:44 +03:00 committed by Ori Perry
parent 63f9087ac3
commit 50eba9108d
1 changed files with 5 additions and 4 deletions

View File

@ -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,
}, },