From 430728dcbe4953cd01cc04eff028a5783efc1d1a Mon Sep 17 00:00:00 2001 From: Aotrix <9aotrix@protonmail.com> Date: Sat, 16 May 2026 13:40:02 +0200 Subject: Divide action into two --- lua/aotrix/plugins/telescope.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lua/aotrix/plugins') 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 (default: ) -- actions.which_key shows the mappings for your picker, -- e.g. git_{create, delete, ...}_branch for the git_branches picker - [""] = custom_close.execute, - [""] = custom_close.execute + [""] = reset_neovide_scale.execute + actions.close, + [""] = 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", "pg", require("telescope").extensions -- cgit v1.2.3