From cae9e0300285528410b88067406f12a70776769a Mon Sep 17 00:00:00 2001 From: Dominik Agres Date: Sun, 7 Jun 2026 21:02:30 +0200 Subject: [PATCH] chore --- nvim/nvim/init.lua | 41 ++++++++ nvim/nvim/lua/config/cmp.lua | 78 +++++++++++++++ nvim/nvim/lua/config/keymaps.lua | 34 +++++++ nvim/nvim/lua/config/lsp.lua | 34 +++++++ nvim/nvim/lua/config/options.lua | 10 ++ nvim/nvim/lua/config/plugins.lua | 143 ++++++++++++++++++++++++++++ nvim/nvim/lua/config/telescope.lua | 25 +++++ nvim/nvim/lua/config/treesitter.lua | 16 ++++ nvim/nvim/spell/de.utf-8.add | 86 +++++++++++++++++ nvim/nvim/spell/de.utf-8.add.spl | Bin 0 -> 1522 bytes zsh/.zshrc | 3 + 11 files changed, 470 insertions(+) create mode 100644 nvim/nvim/init.lua create mode 100644 nvim/nvim/lua/config/cmp.lua create mode 100644 nvim/nvim/lua/config/keymaps.lua create mode 100644 nvim/nvim/lua/config/lsp.lua create mode 100644 nvim/nvim/lua/config/options.lua create mode 100644 nvim/nvim/lua/config/plugins.lua create mode 100644 nvim/nvim/lua/config/telescope.lua create mode 100644 nvim/nvim/lua/config/treesitter.lua create mode 100644 nvim/nvim/spell/de.utf-8.add create mode 100644 nvim/nvim/spell/de.utf-8.add.spl diff --git a/nvim/nvim/init.lua b/nvim/nvim/init.lua new file mode 100644 index 0000000..555739c --- /dev/null +++ b/nvim/nvim/init.lua @@ -0,0 +1,41 @@ +-- Set leader key to Space +vim.g.mapleader = " " +vim.g.maplocalleader = "," + +-- Load basic settings +require("config.options") +require("config.keymaps") + +-- Load plugins (lazy.nvim will be auto-installed) +require("config.plugins") + +-- Plugin-specific configuration +require("config.lsp") +require("config.treesitter") +require("config.telescope") +require("config.cmp") + +-- VimTeX Config + +vim.g.vimtex_view_method = 'zathura' +vim.g.vimtex_compiler_method = 'latexmk' +vim.g.vimtex_compiler_latexmk = { + build_dir = 'out' +} + +-- Language Checks + +vim.api.nvim_create_autocmd("FileType", { + pattern = { "tex", "plaintex", "latex", "markdown" }, + callback = function() + vim.opt_local.spell = true + vim.opt_local.linebreak = true + vim.opt_local.spelllang = { "de_de", "en_us" } + end, +}) + +-- Diable Copilot on Start +vim.g.copilot_filetypes = { + ["*"] = false, +} + diff --git a/nvim/nvim/lua/config/cmp.lua b/nvim/nvim/lua/config/cmp.lua new file mode 100644 index 0000000..2ebf148 --- /dev/null +++ b/nvim/nvim/lua/config/cmp.lua @@ -0,0 +1,78 @@ +-- Completion setup for Neovim using nvim-cmp and LuaSnip + +-- Safely import modules +local cmp_status, cmp = pcall(require, "cmp") +if not cmp_status then + return +end + +local snip_status, luasnip = pcall(require, "luasnip") +if not snip_status then + return +end + +-- Load friendly-snippets (optional, prebuilt snippets) +require("luasnip.loaders.from_vscode").lazy_load() + +-- Setup nvim-cmp +cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.complete(), -- Trigger completion menu + [""] = cmp.mapping.confirm({ select = true }), -- Confirm selection + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { "i", "s" }), + + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }), + + sources = cmp.config.sources({ + { name = "nvim_lsp" }, -- LSP completion + { name = "luasnip" }, -- Snippets + }, { + { name = "buffer" }, -- Words in current buffer + { name = "path" }, -- File system paths + }), + + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + + formatting = { + format = function(entry, vim_item) + vim_item.menu = ({ + nvim_lsp = "[LSP]", + luasnip = "[Snip]", + buffer = "[Buf]", + path = "[Path]", + })[entry.source.name] + return vim_item + end, + }, +}) + +-- Disable cmp for markdown notes (no recommendations/autocomplete) +cmp.setup.filetype("markdown", { + enabled = false, +}) diff --git a/nvim/nvim/lua/config/keymaps.lua b/nvim/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..13f7859 --- /dev/null +++ b/nvim/nvim/lua/config/keymaps.lua @@ -0,0 +1,34 @@ +local map = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +-- Tabs shortcuts +map('n', '', 'BufferPrevious', opts) +map('n', '', 'BufferNext', opts) +map('n', '', 'BufferGoto 1', opts) +map('n', '', 'BufferGoto 2', opts) +map('n', '', 'BufferGoto 3', opts) +map('n', '', 'BufferGoto 4', opts) +map('n', '', 'BufferGoto 5', opts) +map('n', '', 'BufferGoto 6', opts) +map('n', '', 'BufferGoto 7', opts) +map('n', '', 'BufferGoto 8', opts) +map('n', '', 'BufferGoto 9', opts) +map('n', '', 'BufferLast', opts) + +map('n', '', 'BufferClose', opts) + +map('n', '', 'BufferPick', opts) +map('n', '', 'BufferPickDelete', opts) + +map('n', 'bb', 'BufferOrderByBufferNumber', opts) +map('n', 'bn', 'BufferOrderByName', opts) +map('n', 'bd', 'BufferOrderByDirectory', opts) +map('n', 'bl', 'BufferOrderByLanguage', opts) +map('n', 'bw', 'BufferOrderByWindowNumber', opts) + +-- Toggle Neotree +map('n', 'e', ':Neotree toggle', opts) + +-- Terminal +map('n', 't', ':terminal', opts) + diff --git a/nvim/nvim/lua/config/lsp.lua b/nvim/nvim/lua/config/lsp.lua new file mode 100644 index 0000000..ce9d652 --- /dev/null +++ b/nvim/nvim/lua/config/lsp.lua @@ -0,0 +1,34 @@ +-- Common on_attach handler +local on_attach = function(client, bufnr) + local opts = { buffer = bufnr } + vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) + vim.keymap.set("n", "K", vim.lsp.buf.hover, opts) + vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, opts) +end + +-- Configure all your servers +vim.lsp.config("lua_ls", { + on_attach = on_attach, + settings = { + Lua = { diagnostics = { globals = { "vim" } } }, + }, +}) + +vim.lsp.config("pyright", { on_attach = on_attach }) +vim.lsp.config("gopls", { on_attach = on_attach }) +vim.lsp.config("clangd", { on_attach = on_attach }) +vim.lsp.config("omnisharp", { on_attach = on_attach }) +vim.lsp.config("jdtls", { on_attach = on_attach }) +vim.lsp.config("ts_ls", { on_attach = on_attach }) +vim.lsp.config("jsonls", { on_attach = on_attach }) +vim.lsp.config("yamlls", { on_attach = on_attach }) + +-- Enable them all +for _, server in ipairs({ + "lua_ls", "pyright", "gopls", "clangd", + "omnisharp", "jdtls", "ts_ls", "jsonls", "yamlls", +}) do + vim.lsp.enable(server) +end + diff --git a/nvim/nvim/lua/config/options.lua b/nvim/nvim/lua/config/options.lua new file mode 100644 index 0000000..3d96119 --- /dev/null +++ b/nvim/nvim/lua/config/options.lua @@ -0,0 +1,10 @@ +vim.opt.number = true +vim.opt.relativenumber = true +vim.opt.tabstop = 2 +vim.opt.shiftwidth = 2 +vim.opt.expandtab = true +vim.opt.termguicolors = true +vim.opt.cursorline = true +vim.opt.mouse = "a" +vim.opt.clipboard = "unnamedplus" + diff --git a/nvim/nvim/lua/config/plugins.lua b/nvim/nvim/lua/config/plugins.lua new file mode 100644 index 0000000..aecc2c1 --- /dev/null +++ b/nvim/nvim/lua/config/plugins.lua @@ -0,0 +1,143 @@ +-- Bootstrap lazy.nvim if not installed +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", + lazypath + }) +end +vim.opt.rtp:prepend(lazypath) + +-- Plugins +require("lazy").setup({ + -- Core + "nvim-lua/plenary.nvim", + + -- UI + "nvim-lualine/lualine.nvim", + "nvim-tree/nvim-web-devicons", + + -- Treesitter + --{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + vim.treesitter.language.register("markdown", "vimwiki") + end, + }, + + -- Telescope + "nvim-telescope/telescope.nvim", + + -- LSP + "neovim/nvim-lspconfig", + + -- Themes + "folke/tokyonight.nvim", + { + 'sainnhe/sonokai', + lazy = false, + priority = 1000, + config = function() + -- Optionally configure and load the colorscheme + -- directly inside the plugin declaration. + vim.g.sonokai_enable_italic = true + vim.cmd.colorscheme('sonokai') + end + }, + + -- Vimwiki + { + "vimwiki/vimwiki", + init = function() + vim.g.vimwiki_global_ext = 0 + vim.g.vimwiki_conceallevel = 0 + vim.g.vimwiki_list = { + { + path = "~/wiki/uni/", + syntax = "markdown", + ext = ".md", + name = "Uni", + }, + } + end, + }, + + -- Autocomplete + { + "hrsh7th/nvim-cmp", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + "rafamadriz/friendly-snippets", + }, + + -- Markdown Preview Page +{ + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + ft = { "markdown" }, + build = function() + require("lazy").load({ plugins = { "markdown-preview.nvim" } }) + vim.fn["mkdp#util#install"]() + end, + config = function() + vim.g.mkdp_echo_preview_url = 1 + + vim.cmd([[ + function! OpenMarkdownPreview(url) + call jobstart(['xdg-open', a:url], {'detach': v:true}) + endfunction + ]]) + + vim.g.mkdp_browserfunc = "OpenMarkdownPreview" + end, +}, + + + -- Tabs + { 'romgrk/barbar.nvim', + dependencies = { + 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status + 'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons + }, + init = function() vim.g.barbar_auto_setup = false end, + opts = { + -- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default: + -- animation = true, + -- insert_at_start = true, + -- …etc. + }, + }, + + { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + "nvim-tree/nvim-web-devicons", -- optional, but recommended + }, + lazy = false, -- neo-tree will lazily load itself + }, + + -- GitHub Copilot + "github/copilot.vim", + + { + "lervag/vimtex", + lazy = false, -- we don't want to lazy load VimTeX + -- tag = "v2.15", -- uncomment to pin to a specific release + init = function() + -- VimTeX configuration goes here, e.g. + vim.g.vimtex_view_method = "zathura" + end + }, + +}) + diff --git a/nvim/nvim/lua/config/telescope.lua b/nvim/nvim/lua/config/telescope.lua new file mode 100644 index 0000000..7d4e087 --- /dev/null +++ b/nvim/nvim/lua/config/telescope.lua @@ -0,0 +1,25 @@ +local telescope = require("telescope") + +telescope.setup({ + defaults = { + prompt_prefix = "🔍 ", + selection_caret = " ", + path_display = { "smart" }, + sorting_strategy = "ascending", + layout_config = { prompt_position = "top" }, + }, + pickers = { + find_files = { + hidden = true, -- show hidden files + }, + }, +}) + +-- Optional: keymaps for quick access +local builtin = require("telescope.builtin") +vim.keymap.set("n", "ff", builtin.find_files, { desc = "Find files" }) +vim.keymap.set("n", "fg", builtin.live_grep, { desc = "Grep text" }) +vim.keymap.set("n", "fb", builtin.buffers, { desc = "Find buffers" }) +vim.keymap.set("n", "fh", builtin.help_tags, { desc = "Find help" }) +vim.keymap.set("n", "fr", builtin.oldfiles, { desc = "Recent files" }) + diff --git a/nvim/nvim/lua/config/treesitter.lua b/nvim/nvim/lua/config/treesitter.lua new file mode 100644 index 0000000..45685ba --- /dev/null +++ b/nvim/nvim/lua/config/treesitter.lua @@ -0,0 +1,16 @@ +require("nvim-treesitter.configs").setup({ + ensure_installed = { + -- Programming Languages + "lua", "python", "bash", "javascript", "typescript", + "go", "java", "c", "cpp", "c_sharp", "rust", + + -- Web Languages + "html", "css", "scss", "json", "yaml", "toml", "xml", + + -- Other formats + "markdown", "markdown_inline", "sql", "dockerfile", "gitignore" + }, + highlight = { enable = true }, + indent = { enable = true }, +}) + diff --git a/nvim/nvim/spell/de.utf-8.add b/nvim/nvim/spell/de.utf-8.add new file mode 100644 index 0000000..356354f --- /dev/null +++ b/nvim/nvim/spell/de.utf-8.add @@ -0,0 +1,86 @@ +Heilberufler +ePA +eHBA +Agres +sc +hum +hum +Seidling +EMA +GMP +BfArM +GKV +Primärverpackung +Medikationsprozess +Ärztlicherseits +Medikations +Digitalisierungsprozesse +Telematikinfrastruktur +Heilberuflerausweis +Medikationsprozesse +CLMM +LLM +KI +OpenAI +GPT +Wirkweise +hum +hum +hum +Schickhardt +BVL +Werkzeuge +Zukunftige +Resumee +Vorlesungs +Whatsapp +Zabel +extrakranielle +Intra +Intrakranielle +Extrakraniell +Proffessionsethik +Intrakraniell +intrakraniellen +mitbestrahlt +Oligometastasierung +Hypofraktionierte +Hochdosisbereich +Neurokognition +Ganzhirnbestrahlung +Hippocampusatrophie +neurokognitiven +MRT +Lagerungskontrolle +bildgeführte +Atemgating +Pneumonitis +Lungenläsionen +Begleiterkrankungen +Kapselschmerz +CyberKnife +oligometastasierten +Tumorschäden +hypofraktionierten +p53 +leptomeningeale +Rückenmarkshäute +SBRT +intrakraniell +intrakranielle +toc +tex +APA +UniTyLab +Unitylab +VR +Holodeck +augmentationen +Unitylabs +Expositionstherapie +LLMs +OsiriX +Meixner +Homeoffice +ArbN +ArbG diff --git a/nvim/nvim/spell/de.utf-8.add.spl b/nvim/nvim/spell/de.utf-8.add.spl new file mode 100644 index 0000000000000000000000000000000000000000..c57d6e18bcd6231ec267f7a3177164885d454a55 GIT binary patch literal 1522 zcmZ8hJ#W-N5cRAtqCrS$=%W+5HUiNhqzeU!NPvPwa8$N$&t7@`A%9$wYZ8749UVUb zy89>ST7Cn(H+GPS;5NH6vv20jy!FM&SzBB0pZ*Dg$@$|bPL?*!T<(jqs++d!*O!~^ zURpO@FO67f#TbdiOe8jGDdv{{trU{N+KH1=BnYM{&IRlxY=gbRp66gWNIXK8fM4l#CQ3C~ z1Rw_zPGg2-t<-?4WCL4^e@tyB8U8#e>MI_9#|jgfxi1iSnYxwGA#Yu+(A+LjD;-5%#j@I$P_iptEkzx~jj%9Y50RL5&@303D%g ztz6=Sdj}4M)F>_iVu2lf904g3O&(=o;tOP3j%3;qlWj_fG0osv0&h6w*j324f*;volnj+Ty)k|R@T^od+r}&% zjJdXMoHZ!?r<8%>)XEj$2FX&E)Ze|4E+}(8ph`%&PziGb<7TORJGsVKBZ)%{ z=#~jv!yeBXT;Q7_8U0Khq@m5&z+4~yQ2y{C zdFZsg8=Ux+p?=wD>RBgr&;>#8`N90?)#xL@Bw?HWb^~J sZ{<|Z)ZZG&guS2Z@dU`@{P#cVg%1EYMeziS&GCC~J{{?Cj`TtB7ZbWCasU7T literal 0 HcmV?d00001 diff --git a/zsh/.zshrc b/zsh/.zshrc index 95c8650..fa35df2 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -64,6 +64,9 @@ alias vps01='tmux new-session -s vps01 "ssh agres@agres.online"' alias vps02='tmux new-session -s vps02 "ssh agres@agres.cloud"' alias pve01='tmux new-session -s pve01 "ssh agres@192.168.0.200"' +# docs folder +alias docsync='cd ~/documents && git pull && git add -A && git commit -m "sync $(date +%F)" && git push' + # Slop Alias claude() { if [ $# -eq 0 ]; then