diff options
| author | Thomas Schmucker <ts@its1.de> | 2025-12-22 17:37:13 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2025-12-22 17:37:13 +0100 |
| commit | e8bd36899b88285c94c850f0dfce0754d94cfe24 (patch) | |
| tree | aa857a427db278888233ab03cad59b138d16eaa8 /nvim/lua/config/options.lua | |
| parent | 6f6457b7397247a34e25d4d9bfca434d8306283e (diff) | |
| download | dotfiles-e8bd36899b88285c94c850f0dfce0754d94cfe24.tar.gz dotfiles-e8bd36899b88285c94c850f0dfce0754d94cfe24.tar.bz2 dotfiles-e8bd36899b88285c94c850f0dfce0754d94cfe24.zip | |
Neovim: Neue Konfiguration
Diffstat (limited to 'nvim/lua/config/options.lua')
| -rw-r--r-- | nvim/lua/config/options.lua | 110 |
1 files changed, 110 insertions, 0 deletions
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 @@ | |||
| 1 | local opt = vim.opt | ||
| 2 | local g = vim.g | ||
| 3 | |||
| 4 | -- Allgemeine Einstellungen | ||
| 5 | opt.number = true | ||
| 6 | opt.cursorline = true | ||
| 7 | opt.shortmess:append("I") | ||
| 8 | opt.wrap = false | ||
| 9 | opt.wildmenu = true | ||
| 10 | opt.splitright = true | ||
| 11 | opt.splitbelow = true | ||
| 12 | opt.signcolumn = "yes" | ||
| 13 | opt.termguicolors = true | ||
| 14 | |||
| 15 | -- Rechtschreibprüfung | ||
| 16 | opt.spelllang = { "de", "en" } | ||
| 17 | opt.spell = true | ||
| 18 | |||
| 19 | -- Optionen für ^n-Vervollständigung | ||
| 20 | opt.complete = { ".", "w", "b", "u", "t", "i" } | ||
| 21 | |||
| 22 | -- bessere Suche | ||
| 23 | opt.hlsearch = true | ||
| 24 | opt.incsearch = true | ||
| 25 | opt.ignorecase = true | ||
| 26 | opt.smartcase = true | ||
| 27 | |||
| 28 | -- Sonderzeichen anzeigen | ||
| 29 | opt.list = true | ||
| 30 | opt.listchars = { | ||
| 31 | tab = "> ", | ||
| 32 | trail = "-", | ||
| 33 | extends = ">", | ||
| 34 | precedes = "<", | ||
| 35 | nbsp = "+" | ||
| 36 | } | ||
| 37 | opt.matchpairs:append("<:>") | ||
| 38 | |||
| 39 | -- automatisches Einlesen geänderter Dateien | ||
| 40 | opt.autoread = true | ||
| 41 | |||
| 42 | -- Suche rekursiv | ||
| 43 | opt.path:append("**") | ||
| 44 | |||
| 45 | -- Tabs | ||
| 46 | opt.expandtab = false | ||
| 47 | opt.tabstop = 4 | ||
| 48 | opt.shiftwidth = 4 | ||
| 49 | opt.softtabstop = 0 | ||
| 50 | |||
| 51 | -- Einrückungen | ||
| 52 | opt.smartindent = true | ||
| 53 | opt.autoindent = true | ||
| 54 | opt.cindent = true | ||
| 55 | |||
| 56 | -- Faltungen | ||
| 57 | opt.foldlevel = 1000 | ||
| 58 | opt.foldcolumn = "0" | ||
| 59 | |||
| 60 | -- Autovervollständigung | ||
| 61 | opt.completeopt = { "longest", "menuone", "noselect", "popup" } | ||
| 62 | |||
| 63 | -- externe Programme | ||
| 64 | opt.makeprg = "gmake" | ||
| 65 | opt.autowrite = true | ||
| 66 | |||
| 67 | -- Guifont | ||
| 68 | opt.guifont = "JetBrains Mono Semibold:h12" | ||
| 69 | |||
| 70 | -- Provider | ||
| 71 | g.python3_host_prog = "/usr/local/bin/python" | ||
| 72 | |||
| 73 | -- Provider aeaktivieren | ||
| 74 | g.loaded_node_provider = 0 | ||
| 75 | g.loaded_ruby_provider = 0 | ||
| 76 | g.loaded_perl_provider = 0 | ||
| 77 | g.loaded_luarocks_provider = 0 | ||
| 78 | |||
| 79 | -- Swap files und Undo | ||
| 80 | opt.swapfile = false | ||
| 81 | opt.undofile = true | ||
| 82 | opt.undolevels = 10000 | ||
| 83 | opt.undoreload = 10000 | ||
| 84 | |||
| 85 | -- Clipboard | ||
| 86 | opt.clipboard = "unnamedplus" | ||
| 87 | |||
| 88 | -- netrw deaktivieren | ||
| 89 | g.loaded_netrw = 1 | ||
| 90 | g.loaded_netrwPlugin = 1 | ||
| 91 | |||
| 92 | g.mapleader = "," | ||
| 93 | g.maplocalleader = "\\" | ||
| 94 | |||
| 95 | vim.diagnostic.config({ | ||
| 96 | virtual_text = true, | ||
| 97 | signs = true, | ||
| 98 | underline = true, | ||
| 99 | update_in_insert = false, | ||
| 100 | severity_sort = true, | ||
| 101 | float = { border = "rounded" }, | ||
| 102 | }) | ||
| 103 | |||
| 104 | vim.lsp.util.open_floating_preview = (function(orig) | ||
| 105 | return function(contents, syntax, opts, ...) | ||
| 106 | opts = opts or {} | ||
| 107 | opts.border = opts.border or "rounded" | ||
| 108 | return orig(contents, syntax, opts, ...) | ||
| 109 | end | ||
| 110 | end)(vim.lsp.util.open_floating_preview) | ||
