{ pkgs, ... }: { enable = true; defaultEditor = true; enableMan = true; extraConfigLua = '' local signs = { Error = "󰀨 ", Warn = " ", Hint = " ", Info = " " } for type, icon in pairs(signs) do local hl = "DiagnosticSign" .. type vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) end vim.api.nvim_create_autocmd({'BufEnter'}, { pattern = {'*.png'}, command = '!setsid imv %', }) vim.api.nvim_create_autocmd({'BufRead'}, { pattern = {'*.zig'}, command = 'map f :!zig fmt %', }) ''; diagnostic.settings = { virtual_text = { prefix = "󰬨"; }; }; opts = { mouse = "a"; number = true; softtabstop = 0; expandtab = false; tabstop = 2; shiftwidth = 2; smartindent = true; list = true; listchars = { tab = "▏ "; eol = "¬"; trail = "·"; nbsp = "•"; }; splitright = true; splitbelow = true; showcmd = true; wildmenu = true; hlsearch = true; autoread = true; swapfile = false; relativenumber = true; spell = true; spelllang = ["en_us" "de_ch"]; }; clipboard = { register = "unnamedplus"; providers.wl-copy.enable = true; }; colorschemes.base16 = { enable = true; colorscheme = "gruvbox-dark-pale"; }; plugins = import ./plugins/default.nix { inherit pkgs; }; globals = { mapleader = ","; autoformat = false; zig_fmt_autosave = false; }; keymaps = [ { key = "tf"; action = "NvimTreeToggle"; mode = "n"; } { key = "tp"; action = "TypstPreview"; mode = "n"; } { key = "tn"; action = "tabnew"; } { key = "tc"; action = "tabclose"; } { key = "f"; action = "lua require('telescope.builtin').find_files()"; mode = "n"; } { key = "g"; action = "lua require('telescope.builtin').live_grep()"; mode = "n"; } { key = "m"; action = "lua require('telescope.builtin').man_pages({ sections = { 'ALL' } })"; mode = "n"; } { key = "d"; action = "lua vim.diagnostic.open_float()"; mode = "n"; } { key = "a"; action = "ä"; mode = "i"; } { key = "o"; action = "ö"; mode = "i"; } { key = "u"; action = "ü"; mode = "i"; } { key = "A"; action = "Ä"; mode = "i"; } { key = "O"; action = "Ö"; mode = "i"; } { key = "U"; action = "Ü"; mode = "i"; } ]; }