From 1bb73aed5f4bd1e00a0b3cbe03f2aaa42bad4e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Bergstr=C3=B6m?= Date: Sun, 18 Jul 2021 10:12:04 +0200 Subject: [PATCH] Set a filetype for the results buffer (#1019) **Why** is the change needed? So that it can be targeted with specific settings. These could include disabling plugins for the buffer (as in #840) or disabling folding (as per #991). **How** is the need addressed? - Add a filetype to the buffer after it has been created. Closes #991 --- lua/telescope/pickers.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index 449d869..00b7446 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -471,6 +471,7 @@ function Picker:find() -- Do filetype last, so that users can register at the last second. pcall(a.nvim_buf_set_option, prompt_bufnr, 'filetype', 'TelescopePrompt') + pcall(a.nvim_buf_set_option, results_bufnr, 'filetype', 'TelescopeResults') if self.default_text then self:set_prompt(self.default_text)