Add font resize plugin

This commit is contained in:
Tyler Hallada 2022-10-06 01:20:49 -04:00
parent 6ea6401f65
commit 71d5ed1952
2 changed files with 14 additions and 0 deletions

View File

@ -341,6 +341,12 @@ return require('packer').startup(function(use)
require('plugins.indent-blankline-nvim') require('plugins.indent-blankline-nvim')
end, 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 -- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins -- Put this at the end after all plugins

View File

@ -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', '<D-Up>', [[<Cmd>GUIFontSizeUp<CR>]], { noremap = true, silent = true})
vim.keymap.set('n', '<D-Down>', [[<Cmd>GUIFontSizeDown<CR>]], { noremap = true, silent = true})
vim.keymap.set('n', '<D-0>', [[<Cmd>set guifont=Hack:h11 | GUIFontSizeSet<CR>]], { noremap = true, silent = true})