- started adding dap

This commit is contained in:
Erik Mertens
2025-06-26 07:28:40 +02:00
parent 5942a17ff5
commit f9c8a41cc6
4 changed files with 42 additions and 35 deletions

View File

@ -1,4 +1,3 @@
function Change_font_size(delta)
local iter = 0
@ -17,7 +16,7 @@ function Change_font_size(delta)
-- print("Fontsize: " .. font_size)
vim.print('Changing font size to: ' .. font_size)
vim.api.nvim_set_option_value("guifont", font_name .. ':h' .. font_size, { scope = "global"})
vim.api.nvim_set_option_value("guifont", font_name .. ':h' .. font_size, { scope = "global" })
end
if vim.g.nvui then
@ -47,12 +46,12 @@ if vim.g.neovide then
vim.g.neovide_title_background_color = string.format(
"%x",
vim.api.nvim_get_hl(0, {id=vim.api.nvim_get_hl_id_by_name("Normal")}).bg
vim.api.nvim_get_hl(0, { id = vim.api.nvim_get_hl_id_by_name("Normal") }).bg
)
vim.g.neovide_title_text_color = string.format(
"%x",
vim.api.nvim_get_hl(0, {id=vim.api.nvim_get_hl_id_by_name("Normal")}).fg
vim.api.nvim_get_hl(0, { id = vim.api.nvim_get_hl_id_by_name("Normal") }).fg
)
vim.o.titlestring = 'nvim'
@ -62,13 +61,16 @@ if vim.g.neovide then
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta
vim.print('Changing scale to: ' .. vim.g.neovide_scale_factor)
end
vim.api.nvim_set_keymap("n", "<C-+>", "", { noremap = true, desc = "Increase font size", callback = function () change_scale_factor(1.1) end })
vim.api.nvim_set_keymap("n", "<C-->", "", { noremap = true, desc = "Decrease font size", callback = function () change_scale_factor(1 / 1.1) end })
vim.api.nvim_set_keymap("n", "<C-+>", "",
{ noremap = true, desc = "Increase font size", callback = function() change_scale_factor(1.1) end })
vim.api.nvim_set_keymap("n", "<C-->", "",
{ noremap = true, desc = "Decrease font size", callback = function() change_scale_factor(1 / 1.1) end })
end
if vim.g.nvui then
vim.o.guifont = "Maple Mono:h13"
vim.api.nvim_set_keymap("n", "<C-+>", "", { noremap = true, desc = "Increase font size", callback = function () Change_font_size(1) end })
vim.api.nvim_set_keymap("n", "<C-->", "", { noremap = true, desc = "Decrease font size", callback = function () Change_font_size(-1) end })
vim.api.nvim_set_keymap("n", "<C-+>", "",
{ noremap = true, desc = "Increase font size", callback = function() Change_font_size(1) end })
vim.api.nvim_set_keymap("n", "<C-->", "",
{ noremap = true, desc = "Decrease font size", callback = function() Change_font_size(-1) end })
end