From e8bd36899b88285c94c850f0dfce0754d94cfe24 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Mon, 22 Dec 2025 17:37:13 +0100 Subject: Neovim: Neue Konfiguration --- nvim/lua/config/options.lua | 110 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 nvim/lua/config/options.lua (limited to 'nvim/lua/config/options.lua') diff --git a/nvim/lua/config/options.lua b/nvim/lua/config/options.lua new file mode 100644 index 0000000..097e5d6 --- /dev/null +++ b/nvim/lua/config/options.lua @@ -0,0 +1,110 @@ +local opt = vim.opt +local g = vim.g + +-- Allgemeine Einstellungen +opt.number = true +opt.cursorline = true +opt.shortmess:append("I") +opt.wrap = false +opt.wildmenu = true +opt.splitright = true +opt.splitbelow = true +opt.signcolumn = "yes" +opt.termguicolors = true + +-- Rechtschreibprüfung +opt.spelllang = { "de", "en" } +opt.spell = true + +-- Optionen für ^n-Vervollständigung +opt.complete = { ".", "w", "b", "u", "t", "i" } + +-- bessere Suche +opt.hlsearch = true +opt.incsearch = true +opt.ignorecase = true +opt.smartcase = true + +-- Sonderzeichen anzeigen +opt.list = true +opt.listchars = { + tab = "> ", + trail = "-", + extends = ">", + precedes = "<", + nbsp = "+" +} +opt.matchpairs:append("<:>") + +-- automatisches Einlesen geänderter Dateien +opt.autoread = true + +-- Suche rekursiv +opt.path:append("**") + +-- Tabs +opt.expandtab = false +opt.tabstop = 4 +opt.shiftwidth = 4 +opt.softtabstop = 0 + +-- Einrückungen +opt.smartindent = true +opt.autoindent = true +opt.cindent = true + +-- Faltungen +opt.foldlevel = 1000 +opt.foldcolumn = "0" + +-- Autovervollständigung +opt.completeopt = { "longest", "menuone", "noselect", "popup" } + +-- externe Programme +opt.makeprg = "gmake" +opt.autowrite = true + +-- Guifont +opt.guifont = "JetBrains Mono Semibold:h12" + +-- Provider +g.python3_host_prog = "/usr/local/bin/python" + +-- Provider aeaktivieren +g.loaded_node_provider = 0 +g.loaded_ruby_provider = 0 +g.loaded_perl_provider = 0 +g.loaded_luarocks_provider = 0 + +-- Swap files und Undo +opt.swapfile = false +opt.undofile = true +opt.undolevels = 10000 +opt.undoreload = 10000 + +-- Clipboard +opt.clipboard = "unnamedplus" + +-- netrw deaktivieren +g.loaded_netrw = 1 +g.loaded_netrwPlugin = 1 + +g.mapleader = "," +g.maplocalleader = "\\" + +vim.diagnostic.config({ + virtual_text = true, + signs = true, + underline = true, + update_in_insert = false, + severity_sort = true, + float = { border = "rounded" }, +}) + +vim.lsp.util.open_floating_preview = (function(orig) + return function(contents, syntax, opts, ...) + opts = opts or {} + opts.border = opts.border or "rounded" + return orig(contents, syntax, opts, ...) + end +end)(vim.lsp.util.open_floating_preview) -- cgit v1.3