From 3710f9c991d078683120eb29b1341abf0abeba0f Mon Sep 17 00:00:00 2001 From: Mansheng Yang Date: Mon, 8 Jul 2024 11:05:20 +0800 Subject: [PATCH 1/2] allow overriding default disabled filetypes The check for 'filetype' in the internal_filetypes map has been removed from the is_ft_disabled function. This change allows users to override default disabled filetypes. --- lua/copilot/util.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lua/copilot/util.lua b/lua/copilot/util.lua index 7dbc1b0f..f22dc07f 100644 --- a/lua/copilot/util.lua +++ b/lua/copilot/util.lua @@ -86,11 +86,6 @@ local function is_ft_disabled(ft, filetypes) string.format("'filetype' %s rejected by config filetypes[%s]", ft, "*") end - if internal_filetypes[short_ft] ~= nil then - return not internal_filetypes[short_ft], - string.format("'filetype' %s rejected by internal_filetypes[%s]", ft, short_ft) - end - return false end From be366059877ff63c00e31793b0bac99134a95d5e Mon Sep 17 00:00:00 2001 From: Mansheng Yang Date: Wed, 23 Apr 2025 09:34:33 +0800 Subject: [PATCH 2/2] allow overriding default disabled filetypes The check for 'filetype' in the internal_filetypes map has been removed from the is_ft_disabled function. This change allows users to override default disabled filetypes. --- lua/copilot/client/filetypes.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lua/copilot/client/filetypes.lua b/lua/copilot/client/filetypes.lua index 1dff66db..2ede9b0e 100644 --- a/lua/copilot/client/filetypes.lua +++ b/lua/copilot/client/filetypes.lua @@ -69,11 +69,6 @@ function M.is_ft_disabled(ft, filetypes) string.format("'filetype' %s rejected by config filetypes[%s]", ft, "*") end - if M.internal_filetypes[short_ft] ~= nil then - return not M.internal_filetypes[short_ft], - string.format("'filetype' %s rejected by internal_filetypes[%s]", ft, short_ft) - end - return false end