- 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,30 +1,30 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins" },
-- "https://git.erik.mertens.digital/erik/nvim-rpgle.git"
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "habamax" } },
-- automatically check for plugin updates
checker = { enabled = true },
spec = {
-- import your plugins
{ import = "plugins" },
-- "https://git.erik.mertens.digital/erik/nvim-rpgle.git"
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "habamax" } },
-- automatically check for plugin updates
checker = { enabled = false },
})

View File

@ -68,7 +68,12 @@ return { -- LSP Configuration & Plugins
-- for you, so that they are available from within Neovim.
require('mason-tool-installer').setup {}
require('mason-lspconfig').setup {}
require('mason-lspconfig').setup {
ensure_installed = {
"lua_ls", "rust_analyzer", "ts_ls", "vue_ls"
}
}
vim.lsp.config("lua_ls", {
settings = {

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