From 372cb6defd2fa6e20e7cf99305fda2869eb06224 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Fri, 1 Dec 2023 15:26:00 -0500 Subject: [PATCH] Add font resize plugin --- lua/install-plugins.lua | 6 ++++++ lua/plugins/gui-font-resize-nvim.lua | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 lua/plugins/gui-font-resize-nvim.lua diff --git a/lua/install-plugins.lua b/lua/install-plugins.lua index 8f9c77e..fca9dad 100644 --- a/lua/install-plugins.lua +++ b/lua/install-plugins.lua @@ -341,6 +341,12 @@ return require('packer').startup(function(use) require('plugins.indent-blankline-nvim') end, } + use { + 'ktunprasert/gui-font-resize.nvim', + config = function() + require('plugins.gui-font-resize-nvim') + end, + } -- Automatically set up your configuration after cloning packer.nvim -- Put this at the end after all plugins diff --git a/lua/plugins/gui-font-resize-nvim.lua b/lua/plugins/gui-font-resize-nvim.lua new file mode 100644 index 0000000..de33539 --- /dev/null +++ b/lua/plugins/gui-font-resize-nvim.lua @@ -0,0 +1,8 @@ +require('gui-font-resize').setup({ + default_size = 11.0, -- absolute size it will fallback to when :GUIFontSizeSet is not specified + change_by = 1, -- step value that will inc/dec the fontsize by +}) + +vim.keymap.set('n', '', [[GUIFontSizeUp]], { noremap = true, silent = true}) +vim.keymap.set('n', '', [[GUIFontSizeDown]], { noremap = true, silent = true}) +vim.keymap.set('n', '', [[set guifont=Hack:h11 | GUIFontSizeSet]], { noremap = true, silent = true})