From f9c8a41cc60bfe62a6ed37b563748b2f31437b50 Mon Sep 17 00:00:00 2001 From: Erik Mertens Date: Thu, 26 Jun 2025 07:28:40 +0200 Subject: [PATCH] - started adding dap --- lazy-lock.json | 8 ++++---- lua/pluginmanager.lua | 42 +++++++++++++++++++-------------------- lua/plugins/lspconfig.lua | 7 ++++++- lua/ui.lua | 20 ++++++++++--------- 4 files changed, 42 insertions(+), 35 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index ec16d6d..f767fb0 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,14 +4,14 @@ "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "kanagawa-paper.nvim": { "branch": "master", "commit": "b0df20cca3b7087c06f241983b488190cc8e23af" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "c4c84f4521d62de595c0d0f718a9a40c1890c8ce" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "f54e3c11fc9ebfcfc27e696182b0295b071d0811" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, - "mini.nvim": { "branch": "main", "commit": "1b32a3f61f1f649cadc748bd4b7a32b4b4785d29" }, - "nvim-lspconfig": { "branch": "master", "commit": "5e0e9c00d51fcb7efef0d4c49023f9593b38661e" }, + "mini.nvim": { "branch": "main", "commit": "3f5d06a6f710966cb93baaadc4897eeb6d6210e5" }, + "nvim-lspconfig": { "branch": "master", "commit": "314b35335cc84bc2a085c84c69da955ba22da163" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, - "nvim-web-devicons": { "branch": "master", "commit": "19d6211c78169e78bab372b585b6fb17ad974e82" }, + "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } diff --git a/lua/pluginmanager.lua b/lua/pluginmanager.lua index 2fe3444..8c56b93 100644 --- a/lua/pluginmanager.lua +++ b/lua/pluginmanager.lua @@ -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 }, }) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 1e57f5f..87bf363 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -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 = { diff --git a/lua/ui.lua b/lua/ui.lua index 94b3676..b3bf13d 100644 --- a/lua/ui.lua +++ b/lua/ui.lua @@ -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", "", "", { noremap = true, desc = "Increase font size", callback = function () change_scale_factor(1.1) end }) - vim.api.nvim_set_keymap("n", "", "", { noremap = true, desc = "Decrease font size", callback = function () change_scale_factor(1 / 1.1) end }) + vim.api.nvim_set_keymap("n", "", "", + { noremap = true, desc = "Increase font size", callback = function() change_scale_factor(1.1) end }) + vim.api.nvim_set_keymap("n", "", "", + { 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", "", "", { noremap = true, desc = "Increase font size", callback = function () Change_font_size(1) end }) - vim.api.nvim_set_keymap("n", "", "", { noremap = true, desc = "Decrease font size", callback = function () Change_font_size(-1) end }) + vim.api.nvim_set_keymap("n", "", "", + { noremap = true, desc = "Increase font size", callback = function() Change_font_size(1) end }) + vim.api.nvim_set_keymap("n", "", "", + { noremap = true, desc = "Decrease font size", callback = function() Change_font_size(-1) end }) end -