From 9d279070f4b5c2fe0838bad4f34de80a7cb4f429 Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 8 Apr 2026 03:59:27 +0200 Subject: [PATCH] changed language to english --- init.lua | 62 ++++++++++++++++++++++------------------ lua/config/dashboard.lua | 18 ++++++------ lua/core/update.lua | 6 ++-- lua/plugins.lua | 2 +- 4 files changed, 47 insertions(+), 41 deletions(-) diff --git a/init.lua b/init.lua index 622c002..d966482 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,11 @@ -- ~/.config/nvim/init.lua +-- ============================================================================= +-- 0. LANGUAGE SETTINGS (Set UI to English) +-- ============================================================================= +vim.opt.langmenu = "en_US.UTF-8" +pcall(vim.cmd, "language en_US.UTF-8") + -- ============================================================================= -- 1. BOOTSTRAP PAQ (Plugin Manager Installation) -- ============================================================================= @@ -7,13 +13,13 @@ local data_path = vim.fn.stdpath("data") .. "/site/pack/paqs/start/" local paq_path = data_path .. "paq-nvim" if vim.fn.empty(vim.fn.glob(paq_path)) > 0 then - print("Installiere Paq...") + print("Installing Paq...") vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/savq/paq-nvim.git", paq_path }) vim.cmd("packadd paq-nvim") end -- ============================================================================= --- 2. PLUGINS LADEN & AUTO-INSTALL +-- 2. LOAD PLUGINS & AUTO-INSTALL -- ============================================================================= local plugins = require("plugins") local paq = require("paq") @@ -30,12 +36,12 @@ for _, plugin in ipairs(plugins) do end if missing_plugins then - print("Neue Plugins gefunden. Installiere... Bitte danach Neovim neu starten.") + print("New plugins found. Installing... Please restart Neovim afterwards.") paq.install() end -- ============================================================================= --- 3. EDITOR OPTIONEN (A11y / Screenreader optimiert) +-- 3. EDITOR OPTIONS (A11y / Screenreader optimized) -- ============================================================================= local opt = vim.opt opt.number = false @@ -47,31 +53,31 @@ opt.showmode = false opt.mouse = "" opt.shortmess:append("atI") opt.hidden = true -opt.termguicolors = true -- Wichtig für moderne LSPs/UI +opt.termguicolors = true -- Important for modern LSPs/UI -- ============================================================================= --- 4. DIAGNOSTICS (Fehleranzeige) +-- 4. DIAGNOSTICS (Error display) -- ============================================================================= vim.diagnostic.config({ - virtual_text = false, -- Kein Text-Rauschen in der Zeile - underline = true, -- Fehler werden unterstrichen - signs = false, -- Keine Icons am Rand (weniger Lärm) + virtual_text = false, -- No text noise in the line + underline = true, -- Errors are underlined + signs = false, -- No icons on the edge (less noise) update_in_insert = false, }) -- ============================================================================= --- 5. KEYMAPS (Leader: Leertaste) +-- 5. KEYMAPS (Leader: Space) -- ============================================================================= vim.g.mapleader = " " --- Fehlerliste (Quickfix) öffnen -vim.keymap.set("n", "e", vim.diagnostic.setqflist, { desc = "Fehlerliste zeigen" }) +-- Open error list (Quickfix) +vim.keymap.set("n", "e", vim.diagnostic.setqflist, { desc = "Show error list" }) --- Dashboard öffnen +-- Open dashboard vim.keymap.set("n", "b", function() local ok, dashboard = pcall(require, "config.dashboard") - if ok then dashboard.open() else print("Dashboard nicht gefunden!") end -end, { desc = "Zurück zum Dashboard" }) + if ok then dashboard.open() else print("Dashboard not found!") end +end, { desc = "Back to dashboard" }) -- Core Update local ok_up, updater = pcall(require, "core.update") @@ -80,7 +86,7 @@ if ok_up then end -- ============================================================================= --- 6. MASON & LSP SETUP (VERZÖGERT FÜR STABILITÄT) +-- 6. MASON & LSP SETUP (DELAYED FOR STABILITY) -- ============================================================================= vim.schedule(function() local ok_mason, mason = pcall(require, "mason") @@ -96,14 +102,14 @@ vim.schedule(function() ensure_installed = { "basedpyright", "rust_analyzer", "lua_ls" }, }) - -- Sicherheitscheck: Existiert die Funktion wirklich? + -- Security check: Does the function really exist? if mason_lspconfig.setup_handlers then mason_lspconfig.setup_handlers({ - -- Standard-Handler für jeden installierten Server + -- Default handler for each installed server function(server_name) local opts = {} - -- Falls nvim-cmp für Autovervollständigung genutzt wird + -- If nvim-cmp is used for autocompletion local ok_cmp, cmp_lsp = pcall(require, "cmp_nvim_lsp") if ok_cmp then opts.capabilities = cmp_lsp.default_capabilities() @@ -112,7 +118,7 @@ vim.schedule(function() lspconfig[server_name].setup(opts) end, - -- Spezial-Konfiguration für Lua (verhindert 'vim' Warnungen) + -- Special configuration for Lua (prevents 'vim' warnings) ["lua_ls"] = function() lspconfig.lua_ls.setup({ settings = { @@ -130,16 +136,16 @@ local ok_oil, oil = pcall(require, "oil") if ok_oil then oil.setup({ default_file_explorer = true, - columns = { "icon" }, -- Du kannst "icon" auch löschen für puren Text + columns = { "icon" }, -- You can also delete "icon" for pure text view_options = { show_hidden = true, }, }) - -- Keymap: Leertaste + f (File) - vim.keymap.set("n", "f", "Oil", { desc = "Öffne File Manager" }) + -- Keymap: Space + f (File) + vim.keymap.set("n", "f", "Oil", { desc = "Open File Manager" }) end -- ============================================================================= --- 7. BUFFER MANAGEMENT & DASHBOARD LOGIK +-- 7. BUFFER MANAGEMENT & DASHBOARD LOGIC -- ============================================================================= local ok_mini, bufremove = pcall(require, "mini.bufremove") if ok_mini then bufremove.setup({}) end @@ -154,10 +160,10 @@ local function force_dashboard() end) end --- Buffer schließen (Speichern-Abfrage integriert) +-- Close buffer (integrated save prompt) vim.keymap.set("n", "d", function() if vim.bo.modified then - local choice = vim.fn.confirm("Änderungen speichern?", "&Ja\n&Nein\n&Abbrechen", 1) + local choice = vim.fn.confirm("Save changes?", "&Yes\n&No\n&Cancel", 1) if choice == 1 then vim.cmd("write") elseif choice == 3 then @@ -170,9 +176,9 @@ vim.keymap.set("n", "d", function() else vim.cmd("bd!") end -end, { desc = "Buffer schließen" }) +end, { desc = "Close buffer" }) --- Autocommands für Dashboard (beim Start und beim Löschen von Buffern) +-- Autocommands for Dashboard (on startup and when deleting buffers) vim.api.nvim_create_autocmd({ "VimEnter", "BufDelete" }, { callback = function() force_dashboard() diff --git a/lua/config/dashboard.lua b/lua/config/dashboard.lua index 54291ec..59f708a 100644 --- a/lua/config/dashboard.lua +++ b/lua/config/dashboard.lua @@ -1,35 +1,35 @@ local M = {} --- Hilfsfunktion zum Zeichnen des Menüs +-- Helper function to draw the menu local function draw_menu(lines, keymaps) local buf = vim.api.nvim_create_buf(false, true) vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines) vim.api.nvim_set_current_buf(buf) - -- Lokale Einstellungen für das Menü-Fenster + -- Local settings for the menu window vim.opt_local.number = false vim.opt_local.relativenumber = false vim.opt_local.buftype = "nofile" vim.opt_local.bufhidden = "wipe" vim.opt_local.cursorline = true - -- Keymaps für dieses Menü setzen + -- Set keymaps for this menu local opts = { buffer = buf, noremap = true, silent = true } for key, cmd in pairs(keymaps) do vim.keymap.set("n", key, cmd, opts) end end --- Das Plugin-Untermenü (wird bei 'p' aufgerufen) +-- The plugin sub-menu (called with 'p') function M.open_plugins_menu() local lines = { - " PLUGINS VERWALTEN", + " MANAGE PLUGINS", "========================", "", " [u] Update (Sync)", " [i] Install", - " [a] Add (Öffne Liste)", - " [b] Zurück", + " [a] Add (Open List)", + " [b] Back", "", "========================", } @@ -37,12 +37,12 @@ function M.open_plugins_menu() u = ":PaqSync", i = ":PaqInstall", a = ":edit ~/.config/nvim/lua/plugins.lua", - b = function() M.open() end, -- Geht zurück zum Hauptmenü + b = function() M.open() end, -- Returns to the main menu } draw_menu(lines, keys) end --- Das Hauptmenü +-- The main menu function M.open() local lines = { " Mono VIM - 0.17", diff --git a/lua/core/update.lua b/lua/core/update.lua index 6c03786..91eff6f 100644 --- a/lua/core/update.lua +++ b/lua/core/update.lua @@ -2,16 +2,16 @@ local M = {} M.update = function() - print("MonoVim Core wird aktualisiert...") + print("Updating MonoVim Core...") local config_path = vim.fn.stdpath("config") local handle = io.popen("cd " .. config_path .. " && git pull 2>&1") local result = handle:read("*a") handle:close() if result:find("Already up to date") then - print("MonoVim ist bereits aktuell.") + print("MonoVim is already up to date.") else - print("Update erfolgreich! Bitte neu starten.") + print("Update successful! Please restart.") end end diff --git a/lua/plugins.lua b/lua/plugins.lua index cf4fbc5..a00ac94 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,5 +1,5 @@ return { - "savq/paq-nvim", -- Der Manager selbst + "savq/paq-nvim", -- The manager itself "neovim/nvim-lspconfig", -- LSP Support "nvim-treesitter/nvim-treesitter", -- Syntax Highlighting "williamboman/mason.nvim",