From e3353873edd9f0d4705abedffa2e6b7a3b6278b9 Mon Sep 17 00:00:00 2001 From: Christoph Schmatzler Date: Tue, 12 Aug 2025 10:13:57 +0000 Subject: [PATCH] up --- flake.lock | 18 ++-- hosts/nixos/tahani/default.nix | 1 + profiles/base/home-manager/mise.nix | 3 + profiles/base/home-manager/neovim/default.nix | 1 - .../base/home-manager/neovim/mappings.nix | 95 +++++++++++++++++-- profiles/base/home-manager/neovim/options.nix | 4 + .../base/home-manager/neovim/plugins/mini.nix | 12 +++ .../base/home-manager/neovim/plugins/oil.nix | 30 ------ 8 files changed, 115 insertions(+), 49 deletions(-) delete mode 100644 profiles/base/home-manager/neovim/plugins/oil.nix diff --git a/flake.lock b/flake.lock index 456459f..0f49579 100644 --- a/flake.lock +++ b/flake.lock @@ -164,11 +164,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1754924470, - "narHash": "sha256-asI/or9AcUMydwzodCgpHGytnMSNUlciw3uaycpXm4E=", + "lastModified": 1754974548, + "narHash": "sha256-XMjUjKD/QRPcqUnmSDczSYdw46SilnG0+wkho654DFM=", "owner": "nix-community", "repo": "home-manager", - "rev": "67393957c27b4e4c6c48a60108a201413ced7800", + "rev": "27a26be51ff0162a8f67660239f9407dba68d7c5", "type": "github" }, "original": { @@ -196,11 +196,11 @@ "homebrew-cask": { "flake": false, "locked": { - "lastModified": 1754931713, - "narHash": "sha256-8ar1jlSF1PoaAbkaDH/YOKjkTmXiOj+yrojL3Ppf7LQ=", + "lastModified": 1754979074, + "narHash": "sha256-um6BpDFFuPfNku2yKkJLvx2JvrOWlRL/51RmXl/oY7I=", "owner": "homebrew", "repo": "homebrew-cask", - "rev": "a3abcd193aff0596af28b6849eda437dd1baa84f", + "rev": "6acdfa7207c75987bf19ea1fda5ada494a4f2290", "type": "github" }, "original": { @@ -212,11 +212,11 @@ "homebrew-core": { "flake": false, "locked": { - "lastModified": 1754929321, - "narHash": "sha256-0NHsn08/bSSxt13o8zAYtaSuD2M4aziTS8t9o7DvCus=", + "lastModified": 1754979109, + "narHash": "sha256-4QOoUHg2QwLR4P7WjWlcTIPxapZxs83ZS3+yUc4Yrhc=", "owner": "homebrew", "repo": "homebrew-core", - "rev": "d939090d6bdf40b8a5cbbbc8b49eb78ec6b8f445", + "rev": "f991bc151c3e8b708514f01908ae6d431b8ce697", "type": "github" }, "original": { diff --git a/hosts/nixos/tahani/default.nix b/hosts/nixos/tahani/default.nix index 3fc1f63..09dfbb9 100644 --- a/hosts/nixos/tahani/default.nix +++ b/hosts/nixos/tahani/default.nix @@ -66,6 +66,7 @@ local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust + host all all 100.64.0.0/10 trust ''; settings = { shared_preload_libraries = ["timescaledb"]; diff --git a/profiles/base/home-manager/mise.nix b/profiles/base/home-manager/mise.nix index e33e454..bf450c9 100644 --- a/profiles/base/home-manager/mise.nix +++ b/profiles/base/home-manager/mise.nix @@ -3,5 +3,8 @@ enable = true; enableFishIntegration = true; enableZshIntegration = true; + settings = { + auto_install = false; + }; }; } diff --git a/profiles/base/home-manager/neovim/default.nix b/profiles/base/home-manager/neovim/default.nix index 63b0859..eedf497 100644 --- a/profiles/base/home-manager/neovim/default.nix +++ b/profiles/base/home-manager/neovim/default.nix @@ -7,7 +7,6 @@ ./plugins/lazygit.nix ./plugins/lsp.nix ./plugins/mini.nix - ./plugins/oil.nix ./plugins/treesitter.nix ]; diff --git a/profiles/base/home-manager/neovim/mappings.nix b/profiles/base/home-manager/neovim/mappings.nix index b06da14..7347032 100644 --- a/profiles/base/home-manager/neovim/mappings.nix +++ b/profiles/base/home-manager/neovim/mappings.nix @@ -1,10 +1,60 @@ { programs.nixvim.keymaps = [ + # e - explore/edit { mode = "n"; - key = "lf"; - action = ":lua require('conform').format({ lsp_fallback = true })"; - options.desc = "Format"; + key = "ed"; + action = ":lua require('mini.files').open()"; + options.desc = "Directory"; + } + { + mode = "n"; + key = "ef"; + action = ":lua require('mini.files').open(vim.api.nvim_buf_get_name(0))"; + options.desc = "File directory"; + } + # f - find + { + mode = "n"; + key = "f/"; + action = ":Pick history scope='/'"; + options.desc = "'/' history"; + } + { + mode = "n"; + key = "f:"; + action = ":Pick history scope=':'"; + options.desc = "':' history"; + } + { + mode = "n"; + key = "fa"; + action = ":Pick git_hunks scope='staged'"; + options.desc = "Added hunks (all)"; + } + { + mode = "n"; + key = "fA"; + action = ":Pick git_hunks path='%' scope='staged'"; + options.desc = "Added hunks (buffer)"; + } + { + mode = "n"; + key = "fb"; + action = ":Pick buffers"; + options.desc = "Buffers"; + } + { + mode = "n"; + key = "fd"; + action = ":Pick diagnostic scope='all'"; + options.desc = "Diagnostic (workspace)"; + } + { + mode = "n"; + key = "fD"; + action = ":Pick diagnostic scope='current'"; + options.desc = "Diagnostic (buffer)"; } { mode = "n"; @@ -14,21 +64,48 @@ } { mode = "n"; - key = "/"; - action = ":Pick grep_live"; - options.desc = "Grep"; + key = "fr"; + action = ":Pick lsp scope='references'"; + options.desc = "References (LSP)"; } { mode = "n"; - key = "ed"; - action = ":Oil"; - options.desc = "File browser"; + key = "fs"; + action = ":Pick lsp scope='workspace_symbol'"; + options.desc = "Symbols (LSP, workspace)"; } + { + mode = "n"; + key = "fS"; + action = ":Pick lsp scope='document_symbol'"; + options.desc = "Symbols (LSP, buffer)"; + } + # g - git { mode = "n"; key = "gg"; action = ":LazyGit"; options.desc = "Lazygit"; } + # l - lsp/formatter + { + mode = "n"; + key = "lf"; + action = ":lua require('conform').format({ lsp_fallback = true })"; + options.desc = "Format"; + } + # next + { + mode = "n"; + key = "/"; + action = ":Pick grep_live"; + options.desc = "Grep"; + } + { + mode = "n"; + key = "sj"; + action = ":lua require('mini.jump2d').start(require('mini.jump2d').builtin_opts.query)"; + options.desc = "Jump to character"; + } ]; } diff --git a/profiles/base/home-manager/neovim/options.nix b/profiles/base/home-manager/neovim/options.nix index 9353649..ad96908 100644 --- a/profiles/base/home-manager/neovim/options.nix +++ b/profiles/base/home-manager/neovim/options.nix @@ -11,5 +11,9 @@ globals = { clipboard = "osc52"; }; + opts = { + ignorecase = true; + smartcase = true; + }; }; } diff --git a/profiles/base/home-manager/neovim/plugins/mini.nix b/profiles/base/home-manager/neovim/plugins/mini.nix index fd2078b..47150bd 100644 --- a/profiles/base/home-manager/neovim/plugins/mini.nix +++ b/profiles/base/home-manager/neovim/plugins/mini.nix @@ -2,6 +2,18 @@ programs.nixvim.plugins.mini = { enable = true; modules = { + jump = {}; + files = {}; + jump2d = { + settings = { + spotter.__raw = "require('mini.jump2d').gen_spotter.pattern('[^%s%p]+')"; + labels = "asdfghjkl"; + view = { + dim = true; + n_steps_ahead = 2; + }; + }; + }; basics = { options = { basic = true; diff --git a/profiles/base/home-manager/neovim/plugins/oil.nix b/profiles/base/home-manager/neovim/plugins/oil.nix deleted file mode 100644 index 82f910d..0000000 --- a/profiles/base/home-manager/neovim/plugins/oil.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - programs.nixvim.plugins.oil = { - enable = true; - settings = { - columns = [ - "icon" - ]; - keymaps = { - "" = "actions.refresh"; - "qq" = "actions.close"; - }; - skip_confirm_for_simple_edits = true; - constrain_cursor = "editable"; - default_file_explorer = true; - view_options = { - show_hidden = true; - }; - win_options = { - concealcursor = "ncv"; - conceallevel = 3; - cursorcolumn = false; - foldcolumn = "0"; - list = false; - signcolumn = "no"; - spell = false; - wrap = false; - }; - }; - }; -}