Add some neovide config

This commit is contained in:
ViViDboarder 2024-09-19 11:55:58 -07:00
parent a917280627
commit a321e21db9
3 changed files with 19 additions and 1 deletions

View File

@ -43,7 +43,7 @@ vim.api.nvim_create_autocmd({ "CompleteDone" }, {
local has = vim.fn.has local has = vim.fn.has
vim.g.is_mac = (has("mac") or has("macunix") or has("gui_macvim") or vim.fn.system("uname"):find("^darwin") ~= nil) vim.g.is_mac = (has("mac") or has("macunix") or has("gui_macvim") or vim.fn.system("uname"):find("^darwin") ~= nil)
vim.g.is_gui = vim.fn.exists("g:neovide") vim.g.is_gui = (vim.g.neovide or has("gui_macvim"))
-- Require some local values -- Require some local values
utils.require_with_local("variables") utils.require_with_local("variables")

View File

@ -16,6 +16,10 @@ elseif vim.fn.executable("ack") == 1 then
vim.o.grepprg = "ack" vim.o.grepprg = "ack"
end end
if vim.g.neovide then
require("neovide")
end
-- Disable polyglot for langauges I've added special support for -- Disable polyglot for langauges I've added special support for
-- TODO: Can this be moved somewhere better? -- TODO: Can this be moved somewhere better?
vim.g.polyglot_disabled = { "go", "rust" } vim.g.polyglot_disabled = { "go", "rust" }

14
neovim/lua/neovide.lua Normal file
View File

@ -0,0 +1,14 @@
local utils = require("utils")
vim.g.neovide_default_scale_factor = 0.8
vim.g.neovide_scale_factor = vim.g.neovide_default_scale_factor
utils.keymap_set({ "n", "v" }, "<C-+>", function()
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor + 0.1
end, { desc = "Zoom in" })
utils.keymap_set({ "n", "v" }, "<C-->", function()
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor - 0.1
end, { desc = "Zoom out" })
utils.keymap_set({ "n", "v" }, "<C-0>", function()
vim.g.neovide_scale_factor = vim.g.neovide_default_scale_factor
end, { desc = "Zoom reset" })