nvim: split off neovide config

This commit is contained in:
dogeystamp 2024-06-09 14:55:12 -04:00
parent c7f5a86783
commit 9fbc579684
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
3 changed files with 46 additions and 41 deletions

View File

@ -0,0 +1,45 @@
--------------------------------
--------------------------------
-- gui frontend settings
--------------------------------
--------------------------------
vim.o.guifont = "JetBrains Mono:h10"
if vim.g.neovide then
local confutil = require("confutil")
local keymap = confutil.keymap
vim.g.neovide_padding_top = 8
vim.g.neovide_padding_bottom = 8
vim.g.neovide_padding_left = 8
vim.g.transparency = 0
vim.g.neovide_background_color = "#000000" .. 0
vim.g.neovide_cursor_animate_in_insert_mode = false
-- hack to unscrew the scaling issues
-- sometimes opening neovide on a tiling wm makes it not occupy the entire window until resized
vim.api.nvim_create_augroup("NeovideScale", {})
vim.api.nvim_create_autocmd(
"FocusGained",
{
group = "NeovideScale",
once = true,
callback = function()
vim.g.neovide_scale_factor = 1.01
vim.uv.new_timer():start(40, 0, vim.schedule_wrap(function()
vim.g.neovide_scale_factor = 1
end))
end,
}
)
-- no terminal, no Ctrl-Shift-V paste
keymap("<C-S-V>", '<Esc>"+p', { mode = { "n", "i" } })
-- "new-term" in working directory
keymap("<C-S-Return>", function()
vim.system({ 'alacritty' }, { detach = true })
end, { mode = { "n", "i", "v", "t" } })
end

View File

@ -41,6 +41,7 @@ keymap("<leader>eb", "<cmd>Telescope keymaps<cr>")
--------------------------------
--------------------------------
require("frontend")
require("theme")
require("snippets")

View File

@ -1,6 +1,3 @@
local confutil = require("confutil")
local keymap = confutil.keymap
------
-- color theme
------
@ -87,41 +84,3 @@ Group.link("DapUIType", groups["@type.builtin"])
Group.link("DapUIVariable", groups["@variable"])
Group.link("DapUIValue", groups["@number"])
Group.link("DapUIFloatBorder", groups.FloatBorder)
--------------------------------
--------------------------------
-- gui frontend settings
--------------------------------
--------------------------------
vim.o.guifont = "JetBrains Mono:h10"
if vim.g.neovide then
vim.g.neovide_padding_top = 8
vim.g.neovide_padding_bottom = 8
vim.g.neovide_padding_left = 8
vim.g.transparency = 0
vim.g.neovide_background_color = "#000000" .. 0
vim.g.neovide_cursor_animate_in_insert_mode = false
-- hack to unscrew the scaling issues
-- sometimes opening neovide on a tiling wm makes it not occupy the entire window until resized
vim.api.nvim_create_augroup("NeovideScale", {})
vim.api.nvim_create_autocmd(
"FocusGained",
{
group = "NeovideScale",
once = true,
callback = function()
vim.g.neovide_scale_factor = 1.01
vim.uv.new_timer():start(40, 0, vim.schedule_wrap(function()
vim.g.neovide_scale_factor = 1
end))
end,
}
)
-- no terminal, no Ctrl-Shift-V paste
keymap("<C-S-V>", '<Esc>"+p', { mode = { "n", "i" } })
end