diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-10-12 20:35:19 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-10-12 20:35:19 +0200 |
| commit | 81e7ddbd48a9f1fa0039b6728f5f23ece0307900 (patch) | |
| tree | 43ae97ab1572ed951713fb3ebbf19a9cce83690f /lua/alpha/neovide.lua | |
| parent | 6afd39cfeba85f7a042e8329ef01d03facc00a77 (diff) | |
| download | nvim-conf-81e7ddbd48a9f1fa0039b6728f5f23ece0307900.tar.gz nvim-conf-81e7ddbd48a9f1fa0039b6728f5f23ece0307900.zip | |
feat: small improvements
Diffstat (limited to 'lua/alpha/neovide.lua')
| -rw-r--r-- | lua/alpha/neovide.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lua/alpha/neovide.lua b/lua/alpha/neovide.lua new file mode 100644 index 0000000..a283314 --- /dev/null +++ b/lua/alpha/neovide.lua @@ -0,0 +1,30 @@ +local default_font = "JetbrainsMono Nerd Font" +local default_size = 14; + +vim.g.neovide_transparency = 0.9 +vim.o.guifont="JetbrainsMono Nerd Font:h20" +vim.g.neovide_hide_mouse_when_typing = true + +local function set_font(font, size) + font = font or default_font + size = size or default_size + + vim.o.guifont = string.format("%s:h%d", font, size) +end + +set_font() + +local maps = { + f0 = 14, + f1 = 15, + f2 = 16, + f3 = 17, + f4 = 18, + f5 = 19, +} + +for key, value in pairs(maps) do + vim.keymap.set("n", "<leader>" .. key, function () + set_font(nil, value) + end) +end |