diff --git a/Internal/os_nvim_init.lua b/Internal/os_nvim_init.lua index 18c5909..1a8f33a 100644 --- a/Internal/os_nvim_init.lua +++ b/Internal/os_nvim_init.lua @@ -264,35 +264,6 @@ require("lazy").setup({ -- Utilities 'nvim-lua/plenary.nvim', - { - "ThePrimeagen/99", - config = function() - local _99 = require("99") - _99.setup({ - -- When setting this to something that is not inside the CWD tools - -- such as claude code or opencode will have permission issues - -- and generation will fail refer to tool documentation to resolve - -- https://opencode.ai/docs/permissions/#external-directories - -- https://code.claude.com/docs/en/permissions#read-and-edit - tmp_dir = "./tmp", - provider = _99.Providers.OpenCodeProvider, - model = "kimi-k2.5", - }) - - -- take extra note that i have visual selection only in v mode - -- technically whatever your last visual selection is, will be used - -- so i have this set to visual mode so i dont screw up and use an - -- old visual selection - -- - -- likely ill add a mode check and assert on required visual mode - -- so just prepare for it now - vim.keymap.set("v", "9v", function() _99.visual() end) - - --- if you have a request you dont want to make any changes, just cancel it - vim.keymap.set("n", "9x", function() _99.stop_all_requests() end) - vim.keymap.set("n", "9s", function() _99.search() end) - end, - }, }, { install = { colorscheme = { "gruvbox-material" }, @@ -311,7 +282,7 @@ vim.opt.completeopt = { 'menu', 'menuone', 'noselect' } vim.opt.cpoptions:append('$') vim.opt.cursorline = true vim.opt.expandtab = true -vim.opt.guifont = { 'JetBrains_Mono:h9', 'Consolas:h9', 'InputMonoCondensed:h9' } +vim.opt.guifont = 'JetBrains_Mono,Consolas:h9' vim.opt.hlsearch = false vim.opt.ignorecase = true vim.opt.linebreak = true @@ -448,18 +419,28 @@ end -- Keymaps -- ============================================================================ --- Font size adjustment (GUI only) -vim.keymap.set('n', '', function() - vim.opt.guifont = vim.fn.substitute(vim.opt.guifont:get()[1] or '', ':h\\zs\\d\\+', function(m) - return tostring(tonumber(m) + 1) - end, 'g') -end, { silent = true }) +local function adjust_fontsize(amount) + -- Get current font and size + local current_font = vim.opt.guifont:get()[1] or "Consolas" + local current_size = tonumber(current_font:match(":h(%d+)")) or 12 -vim.keymap.set('n', '', function() - vim.opt.guifont = vim.fn.substitute(vim.opt.guifont:get()[1] or '', ':h\\zs\\d\\+', function(m) - return tostring(tonumber(m) - 1) - end, 'g') -end, { silent = true }) + -- Extract font name (everything before :h) + local font_name = current_font:match("^(.+):h%d+") or current_font + + -- Calculate new size + local new_size = math.max(6, current_size + amount) -- Minimum size of 6 + + -- Apply new font setting + if vim.g.neovide then + vim.opt.guifont = font_name .. ":h" .. new_size + else + vim.cmd("GuiFont! " .. font_name .. ":h" .. new_size) + end +end + +-- Numpad mappings +vim.keymap.set('n', '', function() adjust_fontsize(1) end) +vim.keymap.set('n', '', function() adjust_fontsize(-1) end) -- FZF Bindings vim.keymap.set('n', 'h', 'FzfLua oldfiles')