changed language to english

This commit is contained in:
2026-04-08 03:59:27 +02:00
parent 6ba53cf1e3
commit 9d279070f4
4 changed files with 47 additions and 41 deletions

View File

@@ -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", "<leader>e", vim.diagnostic.setqflist, { desc = "Fehlerliste zeigen" })
-- Open error list (Quickfix)
vim.keymap.set("n", "<leader>e", vim.diagnostic.setqflist, { desc = "Show error list" })
-- Dashboard öffnen
-- Open dashboard
vim.keymap.set("n", "<leader>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 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", "<leader>f", "<CMD>Oil<CR>", { desc = "Öffne File Manager" })
-- Keymap: Space + f (File)
vim.keymap.set("n", "<leader>f", "<CMD>Oil<CR>", { 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", "<leader>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", "<leader>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()