diff options
| author | Aotrix <[email protected]> | 2026-05-16 13:40:02 +0200 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2026-05-16 13:40:02 +0200 |
| commit | 430728dcbe4953cd01cc04eff028a5783efc1d1a (patch) | |
| tree | 84cf96e4a552653c3a4e69cb2e295ce1dc47891e /lua/aotrix/plugins/telescope.lua | |
| parent | dfbf4d03d795630ab66957842b0a4432de1d439f (diff) | |
Divide action into two
Diffstat (limited to 'lua/aotrix/plugins/telescope.lua')
| -rw-r--r-- | lua/aotrix/plugins/telescope.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lua/aotrix/plugins/telescope.lua b/lua/aotrix/plugins/telescope.lua index 9900536..6efa24a 100644 --- a/lua/aotrix/plugins/telescope.lua +++ b/lua/aotrix/plugins/telescope.lua @@ -15,10 +15,11 @@ return { local transform_mod = require('telescope.actions.mt').transform_mod -- or create your custom action - local custom_close = transform_mod({ + local reset_neovide_scale = transform_mod({ execute = function(prompt_bufnr) - vim.g.neovide_scale_factor = 1 - actions.close(prompt_bufnr) + if vim.g.neovide then + vim.g.neovide_scale_factor = 1 + end end }) @@ -31,8 +32,8 @@ return { -- map actions.which_key to <C-h> (default: <C-/>) -- actions.which_key shows the mappings for your picker, -- e.g. git_{create, delete, ...}_branch for the git_branches picker - ["<esc>"] = custom_close.execute, - ["<C-c>"] = custom_close.execute + ["<esc>"] = reset_neovide_scale.execute + actions.close, + ["<C-c>"] = reset_neovide_scale.execute + actions.close } }, -- Layout settings @@ -61,7 +62,7 @@ return { require("telescope.builtin").find_files() end) small_font_telescope = function() - vim.g.neovide_scale_factor = 0.70 + vim.g.neovide_scale_factor = 0.75 end vim.cmd "autocmd User TelescopeFindPre lua small_font_telescope()" vim.keymap.set("n", "<leader>pg", require("telescope").extensions |
