summaryrefslogtreecommitdiff
path: root/lua/telescope/pickers.lua
diff options
context:
space:
mode:
authorRasmus Bergström <jrasmusbm@gmail.com>2021-07-18 10:12:04 +0200
committerGitHub <noreply@github.com>2021-07-18 10:12:04 +0200
commit1bb73aed5f4bd1e00a0b3cbe03f2aaa42bad4e52 (patch)
treefa83a4174a3fbd9a85596ca6b661e0bf777321ea /lua/telescope/pickers.lua
parent87fecbea95e0d82030933227f72475cd41fecc63 (diff)
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
Diffstat (limited to 'lua/telescope/pickers.lua')
-rw-r--r--lua/telescope/pickers.lua1
1 files changed, 1 insertions, 0 deletions
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)