diff options
| author | Aotrix <[email protected]> | 2026-05-16 13:25:47 +0200 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2026-05-16 13:25:47 +0200 |
| commit | 34b9a7371a3869f69c81cbf9edf13085a9100f4c (patch) | |
| tree | 9127218c9341587fb9b90f085ac6c18d0df05114 /lua | |
| parent | f4e8a6656dd4a2ca22621eb01d620ad04ef3569b (diff) | |
Add custom action to reset neovide_scale_factor
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/aotrix/plugins/telescope.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lua/aotrix/plugins/telescope.lua b/lua/aotrix/plugins/telescope.lua index 9f48a00..f6b5d31 100644 --- a/lua/aotrix/plugins/telescope.lua +++ b/lua/aotrix/plugins/telescope.lua @@ -10,6 +10,18 @@ return { config = function() local actions = require("telescope.actions") + -- + -- Built-in actions + local transform_mod = require('telescope.actions.mt').transform_mod + + -- or create your custom action + local custom_close = transform_mod({ + execute = function(prompt_bufnr) + vim.g.neovide_scale_factor = 1 + actions.close(prompt_bufnr) + end + }) + require("telescope").setup({ defaults = { -- Default configuration for telescope goes here: @@ -19,7 +31,7 @@ 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>"] = actions.close + ["<esc>"] = custom_close.execute } }, -- Layout settings @@ -51,7 +63,6 @@ return { vim.g.neovide_scale_factor = 0.70 end vim.cmd "autocmd User TelescopeFindPre lua small_font_telescope()" - vim.keymap.set("n", "<leader>pg", require("telescope").extensions .live_grep_args.live_grep_args, {noremap = true}) |
