diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2021-08-21 21:11:51 +0200 |
|---|---|---|
| committer | Simon Hauser <Simon-Hauser@outlook.de> | 2021-08-21 21:13:09 +0200 |
| commit | 8381a215e091dc9e1f6ad9ceaeadf35ef3cfed8f (patch) | |
| tree | 744b7bbfe006c0d41d99f8af94a0c80febd5cefe /lua | |
| parent | e46ef8ffec1637d17dc3f91ade54af3258d5284e (diff) | |
hotfix: should have been there but wasnt
ref: https://github.com/nvim-telescope/telescope.nvim/issues/1145#issuecomment-903161099
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/builtin/init.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lua/telescope/builtin/init.lua b/lua/telescope/builtin/init.lua index c325f55..3d9d3f6 100644 --- a/lua/telescope/builtin/init.lua +++ b/lua/telescope/builtin/init.lua @@ -391,12 +391,14 @@ local apply_config = function(mod) for k, v in pairs(mod) do mod[k] = function(opts) opts = opts or {} - local defaults = {} - local pconf = pickers_conf[k] or {} - if pconf.theme then - defaults = require("telescope.themes")["get_" .. pconf.theme](pconf) - end + local defaults = (function() + if pconf.theme then + return require("telescope.themes")["get_" .. pconf.theme](pconf) + end + return vim.deepcopy(pconf) + end)() + if pconf.mappings then defaults.attach_mappings = function(_, map) for mode, tbl in pairs(pconf.mappings) do |
