diff options
| author | Rasmus Bergström <jrasmusbm@gmail.com> | 2021-07-18 10:12:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-18 10:12:04 +0200 |
| commit | 1bb73aed5f4bd1e00a0b3cbe03f2aaa42bad4e52 (patch) | |
| tree | fa83a4174a3fbd9a85596ca6b661e0bf777321ea | |
| parent | 87fecbea95e0d82030933227f72475cd41fecc63 (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
| -rw-r--r-- | lua/telescope/pickers.lua | 1 |
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) |
