Skip to content

Commit

Permalink
feat!(snippets): remove the ignored_filetypes config
Browse files Browse the repository at this point in the history
This is redundant now that users can filter snippets with more control.
  • Loading branch information
stefanboca committed Jan 12, 2025
1 parent d788aff commit 27ae8af
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions lua/blink/cmp/sources/snippets/default/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
--- @field search_paths? string[]
--- @field global_snippets? string[]
--- @field extended_filetypes? table<string, string[]>
--- @field ignored_filetypes? string[]
--- @field get_filetype? fun(context: blink.cmp.Context): string
--- @field filter_snippets? fun(filetype: string, file: string): boolean
--- @field clipboard_register? string
Expand All @@ -23,7 +22,6 @@ end

function snippets:get_completions(context, callback)
local filetype = self.get_filetype(context)
if vim.tbl_contains(self.registry.config.ignored_filetypes, filetype) then return callback() end

if not self.cache[filetype] then
local global_snippets = self.registry:get_global_snippets()
Expand Down
1 change: 0 additions & 1 deletion lua/blink/cmp/sources/snippets/default/registry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ local default_config = {
search_paths = { vim.fn.stdpath('config') .. '/snippets' },
global_snippets = { 'all' },
extended_filetypes = {},
ignored_filetypes = {},
--- @type string?
clipboard_register = nil,
}
Expand Down

0 comments on commit 27ae8af

Please sign in to comment.