Files
computerhistory/.nvim.lua
T

51 lines
1.5 KiB
Lua
Raw Normal View History

2026-07-11 23:59:58 +02:00
-- 0. Leader-Taste definieren (WICHTIG für deine Keymaps)
-- Muss zwingend vor Lazy geladen werden!
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- 1. lazy.nvim vollautomatisch herunterladen (falls nicht vorhanden)
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- Lade nur die stabile Version
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- 2. Plugins deklarieren und laden
require("lazy").setup({
-- AsciiDoc Unterstützung (Syntax, Faltung)
{ "habamax/vim-asciidoctor" },
-- Telescope (Deine Suchmaschine für die Lore)
{
"nvim-telescope/telescope.nvim",
tag = "0.1.5",
dependencies = { "nvim-lua/plenary.nvim" }
},
-- Fugitive (Git Integration)
{
"tpope/vim-fugitive",
cmd = { "Git", "G", "Gdiffsplit", "Gread", "Gwrite", "GBrowse" },
keys = {
{ "<leader>gs", "<cmd>Git<cr>", desc = "Git Status" },
},
}, -- HIER FEHLTE DIE KLAMMER
})
-- 3. Eigene Kommandos und Keymaps
2026-07-11 01:10:09 +02:00
-- Erstellt ein Neovim-Kommando :BuildLore
vim.api.nvim_create_user_command('BuildLore', function()
-- Führt das Skript im Hintergrund aus und zeigt den Output an
vim.cmd('!./build.sh')
end, {})
2026-07-11 23:59:58 +02:00
-- Legt den Build-Vorgang auf die Taste <Leader>b (Leertaste + b)
2026-07-11 01:10:09 +02:00
vim.keymap.set('n', '<leader>b', ':BuildLore<CR>', { noremap = true, silent = false })