From ac26b74e43e4c57a1364870104f1b56ad264d972 Mon Sep 17 00:00:00 2001 From: iofq Date: Fri, 15 Aug 2025 00:59:00 -0500 Subject: [PATCH 1/2] ensure plugins are exported in overlay --- flake.lock | 4 ++-- flake.nix | 2 +- nvim/lua/config/autocmd.lua | 7 +++++++ nvim/lua/plugins/lsp.lua | 4 +--- nvim/lua/plugins/mini.lua | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index a451654..2685c3c 100644 --- a/flake.lock +++ b/flake.lock @@ -3,10 +3,10 @@ "dart": { "flake": false, "locked": { - "lastModified": 1754291267, + "lastModified": 1755657012, "owner": "iofq", "repo": "dart.nvim", - "rev": "617587d40fd2f2727c18758c4e6decac78459529", + "rev": "c38b1e0d6daa47f8b9c58422e5a7ab57221810fd", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 68da80f..07d80b6 100644 --- a/flake.nix +++ b/flake.nix @@ -88,6 +88,6 @@ } ) // { - overlays.default = neovim-overlay; + overlays.default = final: prev: (plugin-overlay final prev) // (neovim-overlay final prev); }; } diff --git a/nvim/lua/config/autocmd.lua b/nvim/lua/config/autocmd.lua index d40ad17..0ccfabd 100644 --- a/nvim/lua/config/autocmd.lua +++ b/nvim/lua/config/autocmd.lua @@ -1,3 +1,10 @@ +-- create undopath +local undopath = vim.fn.stdpath('data') .. 'undo' +vim.api.nvim_create_autocmd('VimEnter', { + command = 'silent !mkdir -p ' .. undopath, + group = vim.api.nvim_create_augroup('Init', {}), +}) + -- open :h in buffers vim.api.nvim_create_autocmd('BufWinEnter', { pattern = '*', diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua index 6015930..432aac4 100644 --- a/nvim/lua/plugins/lsp.lua +++ b/nvim/lua/plugins/lsp.lua @@ -84,7 +84,6 @@ return { notify_no_formatters = false, formatters_by_ft = { json = { 'jq' }, - puppet = { 'puppet-lint' }, lua = { 'stylua' }, python = { 'ruff' }, nix = { 'nixfmt' }, @@ -111,7 +110,6 @@ return { require('lint').linters_by_ft = { docker = { 'hadolint' }, yaml = { 'yamllint' }, - puppet = { 'puppet-lint' }, sh = { 'shellcheck' }, go = { 'golangcilint' }, ruby = { 'rubocop' }, @@ -124,7 +122,7 @@ return { group = vim.api.nvim_create_augroup('lint', { clear = true }), callback = function() if vim.bo.modifiable then - require('lint').try_lint() + require('lint').try_lint(nil, { ignore_errors = true }) end end, }) diff --git a/nvim/lua/plugins/mini.lua b/nvim/lua/plugins/mini.lua index c82350c..136521a 100644 --- a/nvim/lua/plugins/mini.lua +++ b/nvim/lua/plugins/mini.lua @@ -40,7 +40,7 @@ return { custom_textobjects = { i = extra_ai.indent(), g = extra_ai.buffer(), - e = extra_ai.line(), + l = extra_ai.line(), u = ai.gen_spec.function_call(), a = ai.gen_spec.treesitter { a = '@parameter.outer', i = '@parameter.inner' }, k = ai.gen_spec.treesitter { a = '@assignment.lhs', i = '@assignment.lhs' }, From 7fbcfa7c541a94acf8a3e7f588cb50ca4c3f4a3e Mon Sep 17 00:00:00 2001 From: iofq Date: Tue, 19 Aug 2025 23:07:48 -0500 Subject: [PATCH 2/2] nvim-ts-main --- flake.lock | 196 ++++++++++++++++++++++++------------ flake.nix | 9 +- nix/plugin-overlay.nix | 13 +-- nvim/colors/iofq.lua | 2 +- nvim/lua/plugins/mini.lua | 2 +- nvim/lua/plugins/misc.lua | 5 +- nvim/lua/plugins/snacks.lua | 7 ++ 7 files changed, 150 insertions(+), 84 deletions(-) diff --git a/flake.lock b/flake.lock index 2685c3c..405babb 100644 --- a/flake.lock +++ b/flake.lock @@ -1,18 +1,19 @@ { "nodes": { "dart": { - "flake": false, + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, "locked": { - "lastModified": 1755657012, - "owner": "iofq", - "repo": "dart.nvim", - "rev": "c38b1e0d6daa47f8b9c58422e5a7ab57221810fd", - "type": "github" + "lastModified": 1758080529, + "narHash": "sha256-Sup4+HacL6Xe6mTk23N6sD4uXoU9dcoqRgc9Mu0oQ5E=", + "path": "/home/e/dev/dart.nvim", + "type": "path" }, "original": { - "owner": "iofq", - "repo": "dart.nvim", - "type": "github" + "path": "/home/e/dev/dart.nvim", + "type": "path" } }, "flake-compat": { @@ -89,11 +90,11 @@ ] }, "locked": { - "lastModified": 1754487366, - "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", + "rev": "4524271976b625a4a605beefd893f270620fd751", "type": "github" }, "original": { @@ -102,27 +103,6 @@ "type": "github" } }, - "flake-parts_3": { - "inputs": { - "nixpkgs-lib": [ - "neovim-nightly-overlay", - "hercules-ci-effects", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1751413152, - "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", - "type": "github" - }, - "original": { - "id": "flake-parts", - "type": "indirect" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -140,6 +120,24 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "gen-luarc": { "inputs": { "flake-parts": "flake-parts", @@ -150,10 +148,11 @@ ] }, "locked": { - "lastModified": 1754586557, + "lastModified": 1755304025, + "narHash": "sha256-xVKfjFwc0zMbLMjLTiHz+0llggkjs93SmHkhaa9S3M4=", "owner": "mrcjkb", "repo": "nix-gen-luarc-json", - "rev": "4b8d4da04808062e2b1ef0e7bcd0a03bcb93e043", + "rev": "1865b0ebb753ae5324d7381b1fa8c98c04ec7509", "type": "github" }, "original": { @@ -196,11 +195,11 @@ ] }, "locked": { - "lastModified": 1754416808, - "narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=", + "lastModified": 1758108966, + "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864", + "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", "type": "github" }, "original": { @@ -255,18 +254,21 @@ }, "hercules-ci-effects": { "inputs": { - "flake-parts": "flake-parts_3", + "flake-parts": [ + "neovim-nightly-overlay", + "flake-parts" + ], "nixpkgs": [ "neovim-nightly-overlay", "nixpkgs" ] }, "locked": { - "lastModified": 1752595130, - "narHash": "sha256-CNBgr4OZSuklGtNOa9CnTNo9+Xceqn/EDAC1Tc43fH8=", + "lastModified": 1758022363, + "narHash": "sha256-ENUhCRWgSX4ni751HieNuQoq06dJvApV/Nm89kh+/A0=", "owner": "hercules-ci", "repo": "hercules-ci-effects", - "rev": "5f2e09654b2e70ba643e41609d9f9b6640f22113", + "rev": "1a3667d33e247ad35ca250698d63f49a5453d824", "type": "github" }, "original": { @@ -298,14 +300,15 @@ "git-hooks": "git-hooks_2", "hercules-ci-effects": "hercules-ci-effects", "neovim-src": "neovim-src", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1754641381, + "lastModified": 1759277111, + "narHash": "sha256-SDLZMha2miaChOBGBkQJlTtk2kvcB7WIVVZ2l0/9byc=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "83aaf3085f808dec9ea1b5d16b216875a8081b37", + "rev": "b7b3632fab34541543373254c265da03c1d0f240", "type": "github" }, "original": { @@ -317,11 +320,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1754610154, - "narHash": "sha256-ORfF40X4BGiFxnLNQbdsQbUTW4TkUHfPqyZWHaYL5NE=", + "lastModified": 1759210115, + "narHash": "sha256-oc1pPeoe8458X0r/Wum8CucVcJLlIp4mg+1HiOSVRgA=", "owner": "neovim", "repo": "neovim", - "rev": "038eb01b41b66379f75164507571497929f8847c", + "rev": "198c9e9bca7549cf7110be8c6f1df1c38d4e747f", "type": "github" }, "original": { @@ -332,16 +335,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1754393734, - "narHash": "sha256-fbnmAwTQkuXHKBlcL5Nq1sMAzd3GFqCOQgEQw6Hy0Ak=", + "lastModified": 1755660401, "owner": "NixOS", "repo": "nixpkgs", - "rev": "a683adc19ff5228af548c6539dbc3440509bfed3", + "rev": "5788de501b965d7413f2beaac10aeeb56f9a19a8", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "master", "repo": "nixpkgs", "type": "github" } @@ -376,10 +378,27 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1754893210, + "lastModified": 1759070547, + "narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "defc725219d1fb9b56662370e014012929e557af", + "rev": "647e5c14cbd5067f44ac86b74f014962df460840", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1759300078, + "narHash": "sha256-7G5fSMPNVwWNlFpZLwvKB8PUOaqPzFQbrtZ7RAzg2nw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d48b56f4899ee1d5377291576284969c9e37acc2", "type": "github" }, "original": { @@ -389,13 +408,30 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1757745802, + "narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nvim-treesitter": { "flake": false, "locked": { - "lastModified": 1754640844, + "lastModified": 1757840001, + "narHash": "sha256-9LcVSwWfOvp+1fLWqQtSohGax40gD9sGz9t0amySyDk=", "owner": "nvim-treesitter", "repo": "nvim-treesitter", - "rev": "9866036ec3c5db40700a9178494e0cfdcfe6ecfd", + "rev": "7aa24acae3a288e442e06928171f360bbdf75ba4", "type": "github" }, "original": { @@ -405,13 +441,30 @@ "type": "github" } }, + "nvim-treesitter-main": { + "inputs": { + "nixpkgs": "nixpkgs_4", + "nvim-treesitter": "nvim-treesitter" + }, + "locked": { + "lastModified": 1759471274, + "narHash": "sha256-jZxiszCE/g7oRLHmR8+aNqzP5w53wnfJ84D+AWhIwUk=", + "path": "/home/e/dev/nvim-treesitter-main", + "type": "path" + }, + "original": { + "path": "/home/e/dev/nvim-treesitter-main", + "type": "path" + } + }, "nvim-treesitter-textobjects": { "flake": false, "locked": { - "lastModified": 1751128959, + "lastModified": 1756368113, + "narHash": "sha256-+KmOpRi4JAqm6UqYdtk80jwFrJhLCs0lZM/Liofq0R4=", "owner": "nvim-treesitter", "repo": "nvim-treesitter-textobjects", - "rev": "b54cec389e98c5b0babbe618773acec927437cab", + "rev": "1b2d85d3de6114c4bcea89ffb2cd1ce9e3a19931", "type": "github" }, "original": { @@ -424,11 +477,11 @@ "root": { "inputs": { "dart": "dart", - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "gen-luarc": "gen-luarc", "neovim-nightly-overlay": "neovim-nightly-overlay", - "nixpkgs": "nixpkgs_2", - "nvim-treesitter": "nvim-treesitter", + "nixpkgs": "nixpkgs_3", + "nvim-treesitter-main": "nvim-treesitter-main", "nvim-treesitter-textobjects": "nvim-treesitter-textobjects" } }, @@ -447,6 +500,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -455,11 +523,11 @@ ] }, "locked": { - "lastModified": 1754492133, - "narHash": "sha256-B+3g9+76KlGe34Yk9za8AF3RL+lnbHXkLiVHLjYVOAc=", + "lastModified": 1758728421, + "narHash": "sha256-ySNJ008muQAds2JemiyrWYbwbG+V7S5wg3ZVKGHSFu8=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "1298185c05a56bff66383a20be0b41a307f52228", + "rev": "5eda4ee8121f97b218f7cc73f5172098d458f1d1", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 07d80b6..310e0ab 100644 --- a/flake.nix +++ b/flake.nix @@ -10,12 +10,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; dart = { - url = "github:iofq/dart.nvim"; - flake = false; + url = "path:/home/e/dev/dart.nvim"; }; - nvim-treesitter = { - url = "github:nvim-treesitter/nvim-treesitter/main"; - flake = false; + nvim-treesitter-main = { + url = "path:/home/e/dev/nvim-treesitter-main"; }; nvim-treesitter-textobjects = { url = "github:nvim-treesitter/nvim-treesitter-textobjects/main"; @@ -50,6 +48,7 @@ config.allowUnfree = true; overlays = [ inputs.neovim-nightly-overlay.overlays.default + inputs.nvim-treesitter-main.overlays.default plugin-overlay neovim-overlay # This adds a function can be used to generate a .luarc.json diff --git a/nix/plugin-overlay.nix b/nix/plugin-overlay.nix index 9a51a54..938ba67 100644 --- a/nix/plugin-overlay.nix +++ b/nix/plugin-overlay.nix @@ -11,19 +11,8 @@ in { vimPlugins = prev.vimPlugins.extend ( final': prev': { - dart-nvim = mkNvimPlugin inputs.dart "dart.nvim"; + dart-nvim = inputs.dart.packages.${prev.system}.default; nvim-treesitter-textobjects = mkNvimPlugin inputs.nvim-treesitter-textobjects "nvim-treesitter-textobjects"; - nvim-treesitter = prev'.nvim-treesitter.overrideAttrs (old: rec { - src = inputs.nvim-treesitter; - name = "${old.pname}-${src.rev}"; - postPatch = ""; - # ensure runtime queries get linked to RTP (:TSInstall does this too) - buildPhase = " - mkdir -p $out/queries - cp -a $src/runtime/queries/* $out/queries - "; - nvimSkipModules = [ "nvim-treesitter._meta.parsers" ]; - }); } ); } diff --git a/nvim/colors/iofq.lua b/nvim/colors/iofq.lua index be525d8..7d80403 100644 --- a/nvim/colors/iofq.lua +++ b/nvim/colors/iofq.lua @@ -626,7 +626,7 @@ hi(0, 'SpellLocal', { sp = '#5a93aa', undercurl = true }) hi(0, 'SpellRare', { sp = '#5a93aa', undercurl = true }) hi(0, 'Statement', { fg = '#ad5c7c' }) hi(0, 'StatusLine', { bg = 'none' }) -hi(0, 'StatusLineNC', { bg = 'none' }) +hi(0, 'StatusLineNC', { bg = 'none', fg = "grey" }) hi(0, 'String', { fg = '#7aa4a1' }) hi(0, 'Substitute', { bg = '#e85c51', fg = '#152528' }) hi(0, 'SymbolOutlineConnector', { link = 'Conceal' }) diff --git a/nvim/lua/plugins/mini.lua b/nvim/lua/plugins/mini.lua index 136521a..bd6a08b 100644 --- a/nvim/lua/plugins/mini.lua +++ b/nvim/lua/plugins/mini.lua @@ -32,6 +32,7 @@ return { }, config = function() require('mini.basics').setup { mappings = { windows = true } } + require('mini.icons').setup() vim.schedule(function() local ai = require('mini.ai') local extra_ai = require('mini.extra').gen_ai_spec @@ -54,7 +55,6 @@ return { } require('mini.align').setup() require('mini.bracketed').setup { file = { suffix = 'm' } } - require('mini.icons').setup() require('mini.git').setup() require('mini.surround').setup() require('mini.splitjoin').setup { detect = { separator = '[,;\n]' } } diff --git a/nvim/lua/plugins/misc.lua b/nvim/lua/plugins/misc.lua index 7dacf20..20a9df5 100644 --- a/nvim/lua/plugins/misc.lua +++ b/nvim/lua/plugins/misc.lua @@ -3,7 +3,10 @@ return { 'iofq/dart.nvim', lazy = false, priority = 1001, - config = true, + dependencies = 'echasnovski/mini.nvim', + opts = { + label_marked_fg = 'cyan' + }, }, { 'windwp/nvim-autopairs', diff --git a/nvim/lua/plugins/snacks.lua b/nvim/lua/plugins/snacks.lua index d6dd0b2..246452e 100644 --- a/nvim/lua/plugins/snacks.lua +++ b/nvim/lua/plugins/snacks.lua @@ -186,6 +186,13 @@ return { end, desc = 'pick notifications', }, + { + 'gd', + function() + Snacks.git.blame_line() + end, + desc = 'Snacks git blame', + }, }, }, }