mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 08:07:36 +00:00
Add some neovide config
This commit is contained in:
parent
a917280627
commit
a321e21db9
@ -43,7 +43,7 @@ vim.api.nvim_create_autocmd({ "CompleteDone" }, {
|
||||
|
||||
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_gui = vim.fn.exists("g:neovide")
|
||||
vim.g.is_gui = (vim.g.neovide or has("gui_macvim"))
|
||||
|
||||
-- Require some local values
|
||||
utils.require_with_local("variables")
|
||||
|
@ -16,6 +16,10 @@ elseif vim.fn.executable("ack") == 1 then
|
||||
vim.o.grepprg = "ack"
|
||||
end
|
||||
|
||||
if vim.g.neovide then
|
||||
require("neovide")
|
||||
end
|
||||
|
||||
-- Disable polyglot for langauges I've added special support for
|
||||
-- TODO: Can this be moved somewhere better?
|
||||
vim.g.polyglot_disabled = { "go", "rust" }
|
||||
|
14
neovim/lua/neovide.lua
Normal file
14
neovim/lua/neovide.lua
Normal 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" })
|
Loading…
Reference in New Issue
Block a user