From a004f2472820018a9eb5b7dad31cec27a042945c Mon Sep 17 00:00:00 2001 From: iofq Date: Wed, 22 Oct 2025 01:15:51 -0500 Subject: [PATCH 1/4] jj file hist --- flake.lock | 60 +++++++++++++++---------------- new | 1 + nvim/after/lua/iofq/snacks_jj.lua | 38 ++++++++++++++++++++ nvim/after/plugin/autocmd.lua | 30 ++++++++++++++-- nvim/after/plugin/plugins.lua | 4 ++- 5 files changed, 100 insertions(+), 33 deletions(-) create mode 100644 new diff --git a/flake.lock b/flake.lock index 76ad5f1..f7bb4eb 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1760366615, - "narHash": "sha256-qGWNl+UQLvdFl8AAgywOHthizfKovk8az1xhRhQeVn8=", + "lastModified": 1760745932, + "narHash": "sha256-Z9idyP9kiKxC10VL0vHnxcBwrkpNtBrC+Zxl9mQbCj8=", "owner": "iofq", "repo": "dart.nvim", - "rev": "5fac43b0f7b5500c69a51a3717aef8ccceacd178", + "rev": "26b476f2113143329637a27d4e52ce9772bcae5b", "type": "github" }, "original": { @@ -93,11 +93,11 @@ ] }, "locked": { - "lastModified": 1759362264, - "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=", + "lastModified": 1760813311, + "narHash": "sha256-lbHQ7FXGzt6/IygWvJ1lCq+Txcut3xYYd6VIpF1ojkg=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "758cf7296bee11f1706a574c77d072b8a7baa881", + "rev": "4e627ac2e1b8f1de7f5090064242de9a259dbbc8", "type": "github" }, "original": { @@ -198,11 +198,11 @@ ] }, "locked": { - "lastModified": 1759523803, - "narHash": "sha256-PTod9NG+i3XbbnBKMl/e5uHDBYpwIWivQ3gOWSEuIEM=", + "lastModified": 1760663237, + "narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "cfc9f7bb163ad8542029d303e599c0f7eee09835", + "rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37", "type": "github" }, "original": { @@ -309,11 +309,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1760313895, - "narHash": "sha256-39JFRb006AOsIcOq+03H3y6YcGyaphk1CW5DRi14cOE=", + "lastModified": 1760832323, + "narHash": "sha256-THAk4qzBOsp03bDBYK9Ek3mQEvl2g8Fea0QhpCoEzfs=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "7ff73a295b0065bde2f8b43b31558136ca77bd98", + "rev": "3c9432813e5528a13075f5493da6ff9ef249ad1d", "type": "github" }, "original": { @@ -325,11 +325,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1760312166, - "narHash": "sha256-RnB+oJcP37YT9pjr1osUQtJc+1qcVyaaeSbiSyXwm1Y=", + "lastModified": 1760810839, + "narHash": "sha256-VYkZdjjMOYsugoSydDDWE/1l79swm4zc4NJl1Z0brjA=", "owner": "neovim", "repo": "neovim", - "rev": "72b0bfa1fb7e897e5126aabae718a5480f466b9e", + "rev": "be73c35943f85e7835c3a0fc89bddaeba944db29", "type": "github" }, "original": { @@ -383,11 +383,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1760326837, - "narHash": "sha256-z+C6KRPRjwqEsTEAwUavapBWcbR7YOlQP91O+W5L1ek=", + "lastModified": 1760913523, + "narHash": "sha256-Il5+67iRA3xp0cIErILj4VwEJ2ICrDrvTAHEmBsZJKQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cfe6b045750c3aa5127817bc3f44f2909b1ee175", + "rev": "6a3b08503e9cab108f9f0ec27065c5854655662a", "type": "github" }, "original": { @@ -399,11 +399,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1760038930, - "narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=", + "lastModified": 1760524057, + "narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3", + "rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5", "type": "github" }, "original": { @@ -416,11 +416,11 @@ "nvim-treesitter": { "flake": false, "locked": { - "lastModified": 1760260935, - "narHash": "sha256-To/syCZPs7vKA0WkuBz7ZxCGT/wzj705QfxZng6Nsjo=", + "lastModified": 1760866486, + "narHash": "sha256-ZeNCXy6+I18N+Nu2sKnEk2otVEb8V3tKhL8Jq95wS5k=", "owner": "nvim-treesitter", "repo": "nvim-treesitter", - "rev": "0606c7a9dcaa5c5beee0b0f09043e9fdd1ba0a68", + "rev": "71bf1665f804d46f7e4b24ad7ffc11f6ea5b271a", "type": "github" }, "original": { @@ -437,11 +437,11 @@ "nvim-treesitter-textobjects": "nvim-treesitter-textobjects" }, "locked": { - "lastModified": 1760324917, - "narHash": "sha256-ZlVGaUbxHf4DNR4GWhF1mvlMhP8IBbwF0g8WO1SL+Yw=", + "lastModified": 1760906917, + "narHash": "sha256-WJScDX0q/+PCRpvBSlJfV01kwvu9WCk5YDpzW2Zswj8=", "owner": "iofq", "repo": "nvim-treesitter-main", - "rev": "da2262419eb66cfa426aa62ccf1fc8fdea33b4a0", + "rev": "420c14c0523d65c6c7ce943e8f2fb896eff950e3", "type": "github" }, "original": { @@ -515,11 +515,11 @@ ] }, "locked": { - "lastModified": 1760120816, - "narHash": "sha256-gq9rdocpmRZCwLS5vsHozwB6b5nrOBDNc2kkEaTXHfg=", + "lastModified": 1760802554, + "narHash": "sha256-5YkOYOCF8/XNw89/ABKFB0c/P78U2EVuKRDGTql6+kA=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "761ae7aff00907b607125b2f57338b74177697ed", + "rev": "296ebf0c3668ebceb3b0bfee55298f112b4b5754", "type": "github" }, "original": { diff --git a/new b/new new file mode 100644 index 0000000..fab9518 --- /dev/null +++ b/new @@ -0,0 +1 @@ +print('kjsnadf') diff --git a/nvim/after/lua/iofq/snacks_jj.lua b/nvim/after/lua/iofq/snacks_jj.lua index 639ecfd..aae14fa 100644 --- a/nvim/after/lua/iofq/snacks_jj.lua +++ b/nvim/after/lua/iofq/snacks_jj.lua @@ -49,4 +49,42 @@ function M.status() } end +function M.file_history(filename) + local function preview(ctx) + if ctx.item.rev then + Snacks.picker.preview.cmd( + { 'jj', 'log', '--ignore-working-copy', '--git', '-r', ctx.item.rev, '-p', filename }, + ctx + ) + else + ctx.preview:reset() + return 'No preview available.' + end + end + + local function get_history(f) + local status_raw = vim.fn.system( + 'jj log --ignore-working-copy --no-graph' + .. ' --template \'if(root, format_root_commit(self), label(if(current_working_copy, "working_copy"), concat(separate(" ", self.change_id().shortest(8), self.bookmarks()), " | ", if(empty, label("empty", "(empty)")), if(description, description.first_line(), label(if(empty, "empty"), description_placeholder),),) ++ "\n",),)\'' + .. ' -- ' + .. f + ) + local lines = {} + for line in status_raw:gmatch('[^\r\n]+') do + local rev = string.match(line, '(%w+)%s.*') + table.insert(lines, { + text = line, + rev = rev, + }) + end + return lines + end + + Snacks.picker.pick { + format = 'text', + title = 'jj file history for ' .. filename, + items = get_history(filename), + preview = preview, + } +end return M diff --git a/nvim/after/plugin/autocmd.lua b/nvim/after/plugin/autocmd.lua index e22f2b7..81cb335 100644 --- a/nvim/after/plugin/autocmd.lua +++ b/nvim/after/plugin/autocmd.lua @@ -30,7 +30,7 @@ cmd({ 'FocusGained', 'TermClose', 'TermLeave' }, { }) -- Configure difftool buffers -vim.api.nvim_create_autocmd('FileType', { +cmd('FileType', { pattern = 'qf', group = vim.api.nvim_create_augroup('difftool', { clear = true }), callback = function(event) @@ -41,7 +41,7 @@ vim.api.nvim_create_autocmd('FileType', { local qf = vim.fn.getqflist() local entry = qf[1] - if not entry or not entry.user_data.diff then + if not entry or not entry.user_data or not entry.user_data.diff then return nil end @@ -75,6 +75,32 @@ vim.api.nvim_create_autocmd('FileType', { end, }) +-- open conflicts in qflist +cmd('BufWinEnter', { + callback = function(event) + if not vim.wo.diff then + return + end + + local items = {} + while true do + local found = vim.fn.search('^<<<<<<<', 'W') + if found == 0 then + break + end + local line = vim.api.nvim_buf_get_lines(event.buf, found - 1, found, false)[1] + table.insert(items, { bufnr = event.buf, lnum = found, text = line }) + end + + if #items > 1 then + vim.fn.setqflist(items, 'r') + vim.schedule(function() + vim.cmd(string.format('%dcopen', math.min(10, #items))) + end) + end + end, +}) + -- Init treesitter cmd('FileType', { group = vim.api.nvim_create_augroup('treesitter', { clear = true }), diff --git a/nvim/after/plugin/plugins.lua b/nvim/after/plugin/plugins.lua index 58dae3e..2d8e7c4 100644 --- a/nvim/after/plugin/plugins.lua +++ b/nvim/after/plugin/plugins.lua @@ -56,11 +56,13 @@ map('n', 'f.', Snacks.picker.resume) map('n', 'fb', Snacks.picker.buffers) map('n', 'fq', Snacks.picker.qflist) map('n', 'jf', require('iofq.snacks_jj').status) +map('n', 'jh', function() + require('iofq.snacks_jj').file_history(vim.api.nvim_buf_get_name(0)) +end) vim.schedule(function() require('nvim-treesitter').setup() require('nvim-treesitter-textobjects').setup() - require('render-markdown').setup() require('nvim-autopairs').setup() require('refactoring').setup() From c8d9279372ec4d863b65a2e838d949bbbfc755bc Mon Sep 17 00:00:00 2001 From: iofq Date: Fri, 24 Oct 2025 21:58:25 -0500 Subject: [PATCH 2/4] combine diffs --- .github/workflows/main.yml | 2 +- README.md | 2 +- flake.lock | 60 +++++++++++++++---------------- flake.nix | 1 - nix/neovim-overlay.nix | 27 ++------------ nvim/after/lua/iofq/snacks_jj.lua | 16 +++++++++ nvim/after/plugin/autocmd.lua | 41 ++++++++++++++++++++- nvim/after/plugin/mini.lua | 4 +-- nvim/after/plugin/plugins.lua | 16 ++------- 9 files changed, 93 insertions(+), 76 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 36b3551..4c6ddd7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - package_name: ["nvim-min"] + package_name: ["nvim"] steps: - uses: actions/checkout@v3 - uses: DeterminateSystems/nix-installer-action@main diff --git a/README.md b/README.md index 29a9c20..223d62a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Usage Try it out! ```bash -nix run "github:iofq/nvim.nix" #nvim-min +nix run "github:iofq/nvim.nix" #nvim ``` Or use in a flake: diff --git a/flake.lock b/flake.lock index f7bb4eb..3513204 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1760745932, - "narHash": "sha256-Z9idyP9kiKxC10VL0vHnxcBwrkpNtBrC+Zxl9mQbCj8=", + "lastModified": 1761202123, + "narHash": "sha256-ULrZW4b8SKRvPpJPt8/jkqqc/blQiIWUriNWVXA33so=", "owner": "iofq", "repo": "dart.nvim", - "rev": "26b476f2113143329637a27d4e52ce9772bcae5b", + "rev": "71421e7ef5aee8267e24dc562fdd07a83bda192e", "type": "github" }, "original": { @@ -93,11 +93,11 @@ ] }, "locked": { - "lastModified": 1760813311, - "narHash": "sha256-lbHQ7FXGzt6/IygWvJ1lCq+Txcut3xYYd6VIpF1ojkg=", + "lastModified": 1760948891, + "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4e627ac2e1b8f1de7f5090064242de9a259dbbc8", + "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", "type": "github" }, "original": { @@ -267,11 +267,11 @@ ] }, "locked": { - "lastModified": 1758022363, - "narHash": "sha256-ENUhCRWgSX4ni751HieNuQoq06dJvApV/Nm89kh+/A0=", + "lastModified": 1761230615, + "narHash": "sha256-pLE7U5gOtlA/2wbKCsVRYf5DqMQ5TWBCrCfZGytDDeo=", "owner": "hercules-ci", "repo": "hercules-ci-effects", - "rev": "1a3667d33e247ad35ca250698d63f49a5453d824", + "rev": "7db2b867219a26781437d840ce457b75b7645154", "type": "github" }, "original": { @@ -309,11 +309,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1760832323, - "narHash": "sha256-THAk4qzBOsp03bDBYK9Ek3mQEvl2g8Fea0QhpCoEzfs=", + "lastModified": 1761437965, + "narHash": "sha256-X4SNeOXdFkE7Gt+waO5ck3TqfqWskqJHxt1WIu3nnUQ=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "3c9432813e5528a13075f5493da6ff9ef249ad1d", + "rev": "21595d9f79b5da0eef177dcfdd84ca981ac253a9", "type": "github" }, "original": { @@ -325,11 +325,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1760810839, - "narHash": "sha256-VYkZdjjMOYsugoSydDDWE/1l79swm4zc4NJl1Z0brjA=", + "lastModified": 1761434579, + "narHash": "sha256-S+YmbP/bPETjKk6B/tlh+jwIH7K7iPoXyHLLwTqVOhk=", "owner": "neovim", "repo": "neovim", - "rev": "be73c35943f85e7835c3a0fc89bddaeba944db29", + "rev": "a121ede1bfee2704c26159124f8f61f96c6aa136", "type": "github" }, "original": { @@ -383,11 +383,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1760913523, - "narHash": "sha256-Il5+67iRA3xp0cIErILj4VwEJ2ICrDrvTAHEmBsZJKQ=", + "lastModified": 1761497392, + "narHash": "sha256-aK+BZgnXKktKD1DFAJoB+8KD9L8sf/dmiOa2bShlhlk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6a3b08503e9cab108f9f0ec27065c5854655662a", + "rev": "887b4accbb94043a752c086c2aae6c6b365f7b3f", "type": "github" }, "original": { @@ -399,11 +399,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1760524057, - "narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=", + "lastModified": 1761114652, + "narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5", + "rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c", "type": "github" }, "original": { @@ -416,11 +416,11 @@ "nvim-treesitter": { "flake": false, "locked": { - "lastModified": 1760866486, - "narHash": "sha256-ZeNCXy6+I18N+Nu2sKnEk2otVEb8V3tKhL8Jq95wS5k=", + "lastModified": 1761385693, + "narHash": "sha256-/SGikTPEMxI7rcfGvuJlNZs73/wZiQx14QX9xlfsTv0=", "owner": "nvim-treesitter", "repo": "nvim-treesitter", - "rev": "71bf1665f804d46f7e4b24ad7ffc11f6ea5b271a", + "rev": "98fe644cb3b5ba390d1bc3f89299f93c70020803", "type": "github" }, "original": { @@ -437,11 +437,11 @@ "nvim-treesitter-textobjects": "nvim-treesitter-textobjects" }, "locked": { - "lastModified": 1760906917, - "narHash": "sha256-WJScDX0q/+PCRpvBSlJfV01kwvu9WCk5YDpzW2Zswj8=", + "lastModified": 1761496664, + "narHash": "sha256-xTQUiJu0jJNSEHEv4La1HbaFokup0eWr67Kqf/wDENA=", "owner": "iofq", "repo": "nvim-treesitter-main", - "rev": "420c14c0523d65c6c7ce943e8f2fb896eff950e3", + "rev": "834d66648bb7a96a2ad11d53a33f2d9b13766447", "type": "github" }, "original": { @@ -515,11 +515,11 @@ ] }, "locked": { - "lastModified": 1760802554, - "narHash": "sha256-5YkOYOCF8/XNw89/ABKFB0c/P78U2EVuKRDGTql6+kA=", + "lastModified": 1761311587, + "narHash": "sha256-Msq86cR5SjozQGCnC6H8C+0cD4rnx91BPltZ9KK613Y=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "296ebf0c3668ebceb3b0bfee55298f112b4b5754", + "rev": "2eddae033e4e74bf581c2d1dfa101f9033dbd2dc", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a9cc1ad..e5890fa 100644 --- a/flake.nix +++ b/flake.nix @@ -73,7 +73,6 @@ packages = rec { default = nvim; nvim = pkgs.nvim-pkg; - nvim-min = pkgs.nvim-min-pkg; }; devShells = { default = shell; diff --git a/nix/neovim-overlay.nix b/nix/neovim-overlay.nix index 430c345..efc75a1 100644 --- a/nix/neovim-overlay.nix +++ b/nix/neovim-overlay.nix @@ -17,41 +17,18 @@ let nvim-treesitter nvim-treesitter-textobjects quicker-nvim - refactoring-nvim render-markdown-nvim snacks-nvim ]; - basePackages = with prev; [ + packages = with prev; [ ripgrep fd ]; - # Extra packages that should be included on nixos but don't need to be bundled - extraPackages = with prev; [ - # linters - yamllint - jq - hadolint - nixfmt - shellcheck - golangci-lint - - # LSPs - gopls - lua-language-server - nixd - basedpyright - ]; in { nvim-pkg = mkNeovim { - inherit plugins; - packages = basePackages ++ extraPackages; - }; - - nvim-min-pkg = mkNeovim { - inherit plugins; - packages = basePackages; + inherit plugins packages; }; nvim-luarc-json = final.mk-luarc-json { diff --git a/nvim/after/lua/iofq/snacks_jj.lua b/nvim/after/lua/iofq/snacks_jj.lua index aae14fa..a9c78fe 100644 --- a/nvim/after/lua/iofq/snacks_jj.lua +++ b/nvim/after/lua/iofq/snacks_jj.lua @@ -62,6 +62,21 @@ function M.file_history(filename) end end + local function confirm(picker, item) + picker:close() + local cmd = string.format('jj show --git -r %s', item.rev) + local out = vim.fn.systemlist(cmd) + + local bufnr = vim.api.nvim_create_buf(false, true) + vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, out) + vim.bo[bufnr].bufhidden = 'wipe' + vim.bo[bufnr].buftype = 'nofile' + vim.bo[bufnr].filetype = 'diff' + vim.keymap.set('n', 'q', vim.cmd.bdelete, { buffer = bufnr, noremap = true }) + + vim.api.nvim_set_current_buf(bufnr) + end + local function get_history(f) local status_raw = vim.fn.system( 'jj log --ignore-working-copy --no-graph' @@ -85,6 +100,7 @@ function M.file_history(filename) title = 'jj file history for ' .. filename, items = get_history(filename), preview = preview, + confirm = confirm, } end return M diff --git a/nvim/after/plugin/autocmd.lua b/nvim/after/plugin/autocmd.lua index 81cb335..7e8e994 100644 --- a/nvim/after/plugin/autocmd.lua +++ b/nvim/after/plugin/autocmd.lua @@ -48,7 +48,7 @@ cmd('FileType', { local ns = vim.api.nvim_create_namespace('nvim.difftool.hl') vim.api.nvim_buf_clear_namespace(event.buf, ns, 0, -1) for i, item in ipairs(qf) do - local path = vim.fn.fnamemodify(item.user_data.right, ':t') + local path = vim.fn.fnamemodify(item.user_data.right, ':.') local hl = 'Added' if exec('git diff --quiet -- %s', path) ~= 0 @@ -98,6 +98,45 @@ cmd('BufWinEnter', { vim.cmd(string.format('%dcopen', math.min(10, #items))) end) end + + local function get_hunks(bufnr) + local conf_start = vim.fn.search('^<<<<<<<', 'bc') + local base_start = vim.fn.search('^|||||||', 'W') + local base_end = vim.fn.search('^=======', 'W') + local conf_end = vim.fn.search('^>>>>>>>', 'W') + + local left = vim.api.nvim_buf_get_lines(bufnr, conf_start, base_start - 1, false) + local right = vim.api.nvim_buf_get_lines(bufnr, base_end, conf_end - 1, false) + + return { + start = conf_start, + stop = conf_end, + left = left, + right = right, + } + end + + local function apply_hunk(hunks, first) + local result = {} + if first == -1 then -- left first + vim.list_extend(result, hunks.left) + vim.list_extend(result, hunks.right) + else + vim.list_extend(result, hunks.right) + vim.list_extend(result, hunks.left) + end + + -- apply hunk in place + vim.api.nvim_buf_set_lines(0, hunks.start - 1, hunks.stop, false, result) + end + + -- "combine" mappings ala vscode's merge editor + vim.keymap.set('n', 'dl', function() + apply_hunk(get_hunks(event.buf), -1) + end, { buffer = event.buf }) + vim.keymap.set('n', 'dr', function() + apply_hunk(get_hunks(event.buf), 1) + end, { buffer = event.buf }) end, }) diff --git a/nvim/after/plugin/mini.lua b/nvim/after/plugin/mini.lua index c60ec00..76b5fe9 100644 --- a/nvim/after/plugin/mini.lua +++ b/nvim/after/plugin/mini.lua @@ -18,9 +18,7 @@ vim.schedule(function() require('mini.git').setup() map('n', 'gb', 'Git blame -- %') - map('n', 'go', function() - return MiniGit.show_at_cursor() - end) + map('n', 'go', MiniGit.show_at_cursor) local jump = require('mini.jump2d') jump.setup { diff --git a/nvim/after/plugin/plugins.lua b/nvim/after/plugin/plugins.lua index 2d8e7c4..21c9339 100644 --- a/nvim/after/plugin/plugins.lua +++ b/nvim/after/plugin/plugins.lua @@ -3,12 +3,7 @@ local map = vim.keymap.set require('mini.basics').setup { mappings = { windows = true } } require('mini.icons').setup() -require('dart').setup { - tabline = { - icons = false, - label_marked_fg = 'cyan', - }, -} +require('dart').setup {} require('snacks').setup { bigfile = { enabled = true }, @@ -65,12 +60,6 @@ vim.schedule(function() require('nvim-treesitter-textobjects').setup() require('nvim-autopairs').setup() - require('refactoring').setup() - map('n', 'rr', require('refactoring').select_refactor) - map('n', 'rv', function() - require('refactoring').refactor('Inline Variable') - end) - require('quicker').setup() map('n', 'qf', function() require('quicker').toggle { max_height = 20 } @@ -82,7 +71,6 @@ vim.schedule(function() json = { 'jq' }, lua = { 'stylua' }, python = { 'ruff' }, - nix = { 'nixfmt' }, fish = { 'fish_indent' }, ['*'] = { 'trim_whitespace' }, }, @@ -128,7 +116,7 @@ vim.schedule(function() sources = { default = { 'lsp', 'path', 'snippets', 'ripgrep', 'buffer' }, providers = { - lsp = { fallbacks = {} }, -- include buffer even when LSP is active + lsp = { fallbacks = {}, async = true }, -- include buffer even when LSP is active path = { opts = { get_cwd = vim.fn.getcwd } }, -- use nvim pwd instead of current file pwd ripgrep = { module = 'blink-ripgrep', From 8fc4e6a40762bc511b36533cb4a96de028fc1e8e Mon Sep 17 00:00:00 2001 From: iofq Date: Sun, 9 Nov 2025 10:13:55 -0600 Subject: [PATCH 3/4] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'dart': 'github:iofq/dart.nvim/71421e7ef5aee8267e24dc562fdd07a83bda192e?narHash=sha256-ULrZW4b8SKRvPpJPt8/jkqqc/blQiIWUriNWVXA33so%3D' (2025-10-23) → 'github:iofq/dart.nvim/8822aabbfef95eda2b22a8f7ee08912c762ef941?narHash=sha256-ADZ2b2Oz%2BMOSjdKKCcQX9KmlhtmvVlZFEJr0HigWsOY%3D' (2025-11-01) • Updated input 'neovim-nightly-overlay': 'github:nix-community/neovim-nightly-overlay/21595d9f79b5da0eef177dcfdd84ca981ac253a9?narHash=sha256-X4SNeOXdFkE7Gt%2BwaO5ck3TqfqWskqJHxt1WIu3nnUQ%3D' (2025-10-26) → 'github:nix-community/neovim-nightly-overlay/2c33f92a62588cd30dbba26fa39384e29229bc6f?narHash=sha256-h3c8Mcs4wI0U9JKzDyj1X%2BJUMc5KsfIXu2eyRE5ktAs%3D' (2025-11-09) • Removed input 'neovim-nightly-overlay/flake-compat' • Updated input 'neovim-nightly-overlay/flake-parts': 'github:hercules-ci/flake-parts/864599284fc7c0ba6357ed89ed5e2cd5040f0c04?narHash=sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4%3D' (2025-10-20) → 'github:hercules-ci/flake-parts/26d05891e14c88eb4a5d5bee659c0db5afb609d8?narHash=sha256-xxdepIcb39UJ94%2BYydGP221rjnpkDZUlykKuF54PsqI%3D' (2025-11-06) • Removed input 'neovim-nightly-overlay/git-hooks' • Removed input 'neovim-nightly-overlay/git-hooks/flake-compat' • Removed input 'neovim-nightly-overlay/git-hooks/gitignore' • Removed input 'neovim-nightly-overlay/git-hooks/gitignore/nixpkgs' • Removed input 'neovim-nightly-overlay/git-hooks/nixpkgs' • Removed input 'neovim-nightly-overlay/hercules-ci-effects' • Removed input 'neovim-nightly-overlay/hercules-ci-effects/flake-parts' • Removed input 'neovim-nightly-overlay/hercules-ci-effects/nixpkgs' • Updated input 'neovim-nightly-overlay/neovim-src': 'github:neovim/neovim/a121ede1bfee2704c26159124f8f61f96c6aa136?narHash=sha256-S%2BYmbP/bPETjKk6B/tlh%2BjwIH7K7iPoXyHLLwTqVOhk%3D' (2025-10-25) → 'github:neovim/neovim/ded578625219d5056fdacdba4b04f0d5bf4fbe9d?narHash=sha256-npSk%2BFSPkiaGwKTluegZ3tXqDpe3EFiRMQJ2Cc6rq4Y%3D' (2025-11-08) • Removed input 'neovim-nightly-overlay/treefmt-nix' • Removed input 'neovim-nightly-overlay/treefmt-nix/nixpkgs' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/887b4accbb94043a752c086c2aae6c6b365f7b3f?narHash=sha256-aK%2BBZgnXKktKD1DFAJoB%2B8KD9L8sf/dmiOa2bShlhlk%3D' (2025-10-26) → 'github:NixOS/nixpkgs/cdfa60cc7448c7943dd3feb0ab18e342d569c7a4?narHash=sha256-kGEigbGxzpXpyeU9BtILXsMwTls5XcLyXEwYVfNjO4g%3D' (2025-11-09) • Updated input 'nvim-treesitter-main': 'github:iofq/nvim-treesitter-main/834d66648bb7a96a2ad11d53a33f2d9b13766447?narHash=sha256-xTQUiJu0jJNSEHEv4La1HbaFokup0eWr67Kqf/wDENA%3D' (2025-10-26) → 'github:iofq/nvim-treesitter-main/69e9583fe72fa2dbffcb740563a9cc48396e3f75?narHash=sha256-hRGD%2BCE04Z1qAJAaiJs6o%2BblS0WUEqfVS/5cqA0NcDI%3D' (2025-11-09) • Updated input 'nvim-treesitter-main/nixpkgs': 'github:nixos/nixpkgs/01f116e4df6a15f4ccdffb1bcd41096869fb385c?narHash=sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d%2BdAiC3H%2BCDle4%3D' (2025-10-22) → 'github:nixos/nixpkgs/ae814fd3904b621d8ab97418f1d0f2eb0d3716f4?narHash=sha256-YRqMDEtSMbitIMj%2BJLpheSz0pwEr0Rmy5mC7myl17xs%3D' (2025-11-05) • Updated input 'nvim-treesitter-main/nvim-treesitter': 'github:nvim-treesitter/nvim-treesitter/98fe644cb3b5ba390d1bc3f89299f93c70020803?narHash=sha256-/SGikTPEMxI7rcfGvuJlNZs73/wZiQx14QX9xlfsTv0%3D' (2025-10-25) → 'github:nvim-treesitter/nvim-treesitter/d97d226cfd4c00af000b3b8529261352677fc6a8?narHash=sha256-hXs9TdytYtBeXW6nx9QZiQcqsuj1uLuZMf8kclaScQ8%3D' (2025-11-08) • Updated input 'nvim-treesitter-main/nvim-treesitter-textobjects': 'github:nvim-treesitter/nvim-treesitter-textobjects/1b2d85d3de6114c4bcea89ffb2cd1ce9e3a19931?narHash=sha256-%2BKmOpRi4JAqm6UqYdtk80jwFrJhLCs0lZM/Liofq0R4%3D' (2025-08-28) → 'github:nvim-treesitter/nvim-treesitter-textobjects/7024f8687b060dd9a425bde1fa8621c896a38138?narHash=sha256-gzeT2gtmFaXhRSC13mijH6tlk/eWRZaUrGiEpKoAorA%3D' (2025-11-08) --- flake.lock | 183 ++++++++--------------------------------------------- 1 file changed, 28 insertions(+), 155 deletions(-) diff --git a/flake.lock b/flake.lock index 3513204..4bf9aa7 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1761202123, - "narHash": "sha256-ULrZW4b8SKRvPpJPt8/jkqqc/blQiIWUriNWVXA33so=", + "lastModified": 1762016984, + "narHash": "sha256-ADZ2b2Oz+MOSjdKKCcQX9KmlhtmvVlZFEJr0HigWsOY=", "owner": "iofq", "repo": "dart.nvim", - "rev": "71421e7ef5aee8267e24dc562fdd07a83bda192e", + "rev": "8822aabbfef95eda2b22a8f7ee08912c762ef941", "type": "github" }, "original": { @@ -35,38 +35,6 @@ "type": "github" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -93,11 +61,11 @@ ] }, "locked": { - "lastModified": 1760948891, - "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", + "lastModified": 1762440070, + "narHash": "sha256-xxdepIcb39UJ94+YydGP221rjnpkDZUlykKuF54PsqI=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", + "rev": "26d05891e14c88eb4a5d5bee659c0db5afb609d8", "type": "github" }, "original": { @@ -188,29 +156,6 @@ "type": "github" } }, - "git-hooks_2": { - "inputs": { - "flake-compat": "flake-compat_3", - "gitignore": "gitignore_2", - "nixpkgs": [ - "neovim-nightly-overlay", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1760663237, - "narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -233,53 +178,6 @@ "type": "github" } }, - "gitignore_2": { - "inputs": { - "nixpkgs": [ - "neovim-nightly-overlay", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "hercules-ci-effects": { - "inputs": { - "flake-parts": [ - "neovim-nightly-overlay", - "flake-parts" - ], - "nixpkgs": [ - "neovim-nightly-overlay", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1761230615, - "narHash": "sha256-pLE7U5gOtlA/2wbKCsVRYf5DqMQ5TWBCrCfZGytDDeo=", - "owner": "hercules-ci", - "repo": "hercules-ci-effects", - "rev": "7db2b867219a26781437d840ce457b75b7645154", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "hercules-ci-effects", - "type": "github" - } - }, "luvit-meta": { "flake": false, "locked": { @@ -298,22 +196,18 @@ }, "neovim-nightly-overlay": { "inputs": { - "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks_2", - "hercules-ci-effects": "hercules-ci-effects", "neovim-src": "neovim-src", "nixpkgs": [ "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" + ] }, "locked": { - "lastModified": 1761437965, - "narHash": "sha256-X4SNeOXdFkE7Gt+waO5ck3TqfqWskqJHxt1WIu3nnUQ=", + "lastModified": 1762646693, + "narHash": "sha256-h3c8Mcs4wI0U9JKzDyj1X+JUMc5KsfIXu2eyRE5ktAs=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "21595d9f79b5da0eef177dcfdd84ca981ac253a9", + "rev": "2c33f92a62588cd30dbba26fa39384e29229bc6f", "type": "github" }, "original": { @@ -325,11 +219,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1761434579, - "narHash": "sha256-S+YmbP/bPETjKk6B/tlh+jwIH7K7iPoXyHLLwTqVOhk=", + "lastModified": 1762624437, + "narHash": "sha256-npSk+FSPkiaGwKTluegZ3tXqDpe3EFiRMQJ2Cc6rq4Y=", "owner": "neovim", "repo": "neovim", - "rev": "a121ede1bfee2704c26159124f8f61f96c6aa136", + "rev": "ded578625219d5056fdacdba4b04f0d5bf4fbe9d", "type": "github" }, "original": { @@ -383,11 +277,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1761497392, - "narHash": "sha256-aK+BZgnXKktKD1DFAJoB+8KD9L8sf/dmiOa2bShlhlk=", + "lastModified": 1762704076, + "narHash": "sha256-kGEigbGxzpXpyeU9BtILXsMwTls5XcLyXEwYVfNjO4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "887b4accbb94043a752c086c2aae6c6b365f7b3f", + "rev": "cdfa60cc7448c7943dd3feb0ab18e342d569c7a4", "type": "github" }, "original": { @@ -399,11 +293,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1761114652, - "narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=", + "lastModified": 1762363567, + "narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c", + "rev": "ae814fd3904b621d8ab97418f1d0f2eb0d3716f4", "type": "github" }, "original": { @@ -416,11 +310,11 @@ "nvim-treesitter": { "flake": false, "locked": { - "lastModified": 1761385693, - "narHash": "sha256-/SGikTPEMxI7rcfGvuJlNZs73/wZiQx14QX9xlfsTv0=", + "lastModified": 1762599340, + "narHash": "sha256-hXs9TdytYtBeXW6nx9QZiQcqsuj1uLuZMf8kclaScQ8=", "owner": "nvim-treesitter", "repo": "nvim-treesitter", - "rev": "98fe644cb3b5ba390d1bc3f89299f93c70020803", + "rev": "d97d226cfd4c00af000b3b8529261352677fc6a8", "type": "github" }, "original": { @@ -437,11 +331,11 @@ "nvim-treesitter-textobjects": "nvim-treesitter-textobjects" }, "locked": { - "lastModified": 1761496664, - "narHash": "sha256-xTQUiJu0jJNSEHEv4La1HbaFokup0eWr67Kqf/wDENA=", + "lastModified": 1762704339, + "narHash": "sha256-hRGD+CE04Z1qAJAaiJs6o+blS0WUEqfVS/5cqA0NcDI=", "owner": "iofq", "repo": "nvim-treesitter-main", - "rev": "834d66648bb7a96a2ad11d53a33f2d9b13766447", + "rev": "69e9583fe72fa2dbffcb740563a9cc48396e3f75", "type": "github" }, "original": { @@ -453,11 +347,11 @@ "nvim-treesitter-textobjects": { "flake": false, "locked": { - "lastModified": 1756368113, - "narHash": "sha256-+KmOpRi4JAqm6UqYdtk80jwFrJhLCs0lZM/Liofq0R4=", + "lastModified": 1762622273, + "narHash": "sha256-gzeT2gtmFaXhRSC13mijH6tlk/eWRZaUrGiEpKoAorA=", "owner": "nvim-treesitter", "repo": "nvim-treesitter-textobjects", - "rev": "1b2d85d3de6114c4bcea89ffb2cd1ce9e3a19931", + "rev": "7024f8687b060dd9a425bde1fa8621c896a38138", "type": "github" }, "original": { @@ -506,27 +400,6 @@ "repo": "default", "type": "github" } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "neovim-nightly-overlay", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1761311587, - "narHash": "sha256-Msq86cR5SjozQGCnC6H8C+0cD4rnx91BPltZ9KK613Y=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "2eddae033e4e74bf581c2d1dfa101f9033dbd2dc", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } } }, "root": "root", From f6702ede2103dcd82bf0f927af99dfee62c54e6c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Nov 2025 10:20:40 +0000 Subject: [PATCH 4/4] chore: update flake.lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'neovim-nightly-overlay': 'github:nix-community/neovim-nightly-overlay/2c33f92a62588cd30dbba26fa39384e29229bc6f?narHash=sha256-h3c8Mcs4wI0U9JKzDyj1X%2BJUMc5KsfIXu2eyRE5ktAs%3D' (2025-11-09) → 'github:nix-community/neovim-nightly-overlay/994eb1828abe40f256e27ff38663b4f3f819d4cb?narHash=sha256-HDuT9S50/3%2B2blDIL4Y5qX8g5bA5FtpzP9lyagmyNq4%3D' (2025-11-14) • Updated input 'neovim-nightly-overlay/flake-parts': 'github:hercules-ci/flake-parts/26d05891e14c88eb4a5d5bee659c0db5afb609d8?narHash=sha256-xxdepIcb39UJ94%2BYydGP221rjnpkDZUlykKuF54PsqI%3D' (2025-11-06) → 'github:hercules-ci/flake-parts/52a2caecc898d0b46b2b905f058ccc5081f842da?narHash=sha256-8oNVE8TrD19ulHinjaqONf9QWCKK%2Bw4url56cdStMpM%3D' (2025-11-12) • Updated input 'neovim-nightly-overlay/neovim-src': 'github:neovim/neovim/ded578625219d5056fdacdba4b04f0d5bf4fbe9d?narHash=sha256-npSk%2BFSPkiaGwKTluegZ3tXqDpe3EFiRMQJ2Cc6rq4Y%3D' (2025-11-08) → 'github:neovim/neovim/d017f3c9a0b745e0c57feb8c92dcc852948f7301?narHash=sha256-oGwmSPl%2BFA0y2uPEGkkavr5sxLkpHR6%2BCio8eZ8OtPo%3D' (2025-11-13) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/cdfa60cc7448c7943dd3feb0ab18e342d569c7a4?narHash=sha256-kGEigbGxzpXpyeU9BtILXsMwTls5XcLyXEwYVfNjO4g%3D' (2025-11-09) → 'github:NixOS/nixpkgs/fa972b1d29bb165bebc538c227a6e57f33631789?narHash=sha256-48vHwFWqC7oUMJqcq3xCB84FBHHjvO3rNL18si1IRvo%3D' (2025-11-14) --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 4bf9aa7..b868c12 100644 --- a/flake.lock +++ b/flake.lock @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1762440070, - "narHash": "sha256-xxdepIcb39UJ94+YydGP221rjnpkDZUlykKuF54PsqI=", + "lastModified": 1762980239, + "narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "26d05891e14c88eb4a5d5bee659c0db5afb609d8", + "rev": "52a2caecc898d0b46b2b905f058ccc5081f842da", "type": "github" }, "original": { @@ -203,11 +203,11 @@ ] }, "locked": { - "lastModified": 1762646693, - "narHash": "sha256-h3c8Mcs4wI0U9JKzDyj1X+JUMc5KsfIXu2eyRE5ktAs=", + "lastModified": 1763078664, + "narHash": "sha256-HDuT9S50/3+2blDIL4Y5qX8g5bA5FtpzP9lyagmyNq4=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "2c33f92a62588cd30dbba26fa39384e29229bc6f", + "rev": "994eb1828abe40f256e27ff38663b4f3f819d4cb", "type": "github" }, "original": { @@ -219,11 +219,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1762624437, - "narHash": "sha256-npSk+FSPkiaGwKTluegZ3tXqDpe3EFiRMQJ2Cc6rq4Y=", + "lastModified": 1763078375, + "narHash": "sha256-oGwmSPl+FA0y2uPEGkkavr5sxLkpHR6+Cio8eZ8OtPo=", "owner": "neovim", "repo": "neovim", - "rev": "ded578625219d5056fdacdba4b04f0d5bf4fbe9d", + "rev": "d017f3c9a0b745e0c57feb8c92dcc852948f7301", "type": "github" }, "original": { @@ -277,11 +277,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1762704076, - "narHash": "sha256-kGEigbGxzpXpyeU9BtILXsMwTls5XcLyXEwYVfNjO4g=", + "lastModified": 1763114379, + "narHash": "sha256-48vHwFWqC7oUMJqcq3xCB84FBHHjvO3rNL18si1IRvo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cdfa60cc7448c7943dd3feb0ab18e342d569c7a4", + "rev": "fa972b1d29bb165bebc538c227a6e57f33631789", "type": "github" }, "original": {