AutoYADM commit: 2024-12-15 20:45:02
This commit is contained in:
parent
4cbcabce0d
commit
db1ce4f8fa
1 changed files with 20 additions and 0 deletions
|
@ -1,6 +1,26 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
local defaults = {
|
||||||
|
font_maps = {
|
||||||
|
enabled = true,
|
||||||
|
scale_factor = 1.1,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
M.setup = function(opts)
|
M.setup = function(opts)
|
||||||
|
opts = vim.tbl_extend("force", defaults, opts or {})
|
||||||
|
if opts.font_maps.enabled then
|
||||||
|
local change_scale_factor = function(delta)
|
||||||
|
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta
|
||||||
|
end
|
||||||
|
vim.keymap.set("n", "<C-+>", function()
|
||||||
|
change_scale_factor(opts.font_maps.scale_factor)
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<C-=>", function()
|
||||||
|
change_scale_factor(1 / opts.font_maps.scale_factor)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
print("Setup goes here")
|
print("Setup goes here")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue