From 9ea778fef80c142839986d8abb6d6da571658a6c Mon Sep 17 00:00:00 2001 From: Roel de Cort Date: Sun, 2 Aug 2026 22:44:55 +0200 Subject: [PATCH 1/5] feat(nixvim): expand code relationship navigation Add Telescope call hierarchies and Trouble symbol/location views, and provide Dune as an OCaml-LSP fallback for project document loading. Signed-off-by: Roel de Cort --- config/plugins/lsp/ocaml.nix | 9 ++++++--- config/plugins/utils/telescope.nix | 25 +++++++++++++++++++++++++ config/plugins/utils/trouble.nix | 12 ++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/config/plugins/lsp/ocaml.nix b/config/plugins/lsp/ocaml.nix index 645c48e9..bebbaef8 100644 --- a/config/plugins/lsp/ocaml.nix +++ b/config/plugins/lsp/ocaml.nix @@ -10,9 +10,12 @@ packageFallback = true; }; - # OCaml-LSP delegates formatting to ocamlformat. Keep the Nix package as a - # fallback so a project-local/opam version remains authoritative. - extraPackagesAfter = [ pkgs.ocamlPackages.ocamlformat ]; + # OCaml-LSP needs Dune to load project documents and delegates formatting to + # ocamlformat. Keep both as fallbacks so project-local tools remain authoritative. + extraPackagesAfter = [ + pkgs.dune_3 + pkgs.ocamlPackages.ocamlformat + ]; autoCmd = [ { diff --git a/config/plugins/utils/telescope.nix b/config/plugins/utils/telescope.nix index f38fdd55..093de2a5 100644 --- a/config/plugins/utils/telescope.nix +++ b/config/plugins/utils/telescope.nix @@ -1,6 +1,10 @@ +{ pkgs, ... }: { + extraPlugins = [ pkgs.vimPlugins.telescope-hierarchy-nvim ]; + plugins.telescope = { enable = true; + enabledExtensions = [ "hierarchy" ]; extensions = { file-browser = { enable = true; @@ -18,6 +22,11 @@ }; sorting_strategy = "ascending"; }; + extensions.hierarchy = { + initial_multi_expand = false; + multi_depth = 5; + layout_strategy = "horizontal"; + }; }; keymaps = { "" = { @@ -173,6 +182,22 @@ }; }; keymaps = [ + { + mode = "n"; + key = "ci"; + action = "Telescope hierarchy incoming_calls"; + options = { + desc = "Incoming call hierarchy"; + }; + } + { + mode = "n"; + key = "co"; + action = "Telescope hierarchy outgoing_calls"; + options = { + desc = "Outgoing call hierarchy"; + }; + } { mode = "n"; key = "sd"; diff --git a/config/plugins/utils/trouble.nix b/config/plugins/utils/trouble.nix index 56a3b6f1..6bd10b76 100644 --- a/config/plugins/utils/trouble.nix +++ b/config/plugins/utils/trouble.nix @@ -12,6 +12,18 @@ _: { }; keymaps = [ + { + mode = "n"; + key = "cs"; + action = "Trouble symbols toggle focus=false"; + options.desc = "Document symbols"; + } + { + mode = "n"; + key = "cl"; + action = "Trouble lsp toggle focus=false win.position=right"; + options.desc = "LSP locations"; + } { mode = "n"; key = "xx"; From 5622e33bfeb4792a732b7ced737d638d7400412e Mon Sep 17 00:00:00 2001 From: Roel de Cort Date: Sun, 2 Aug 2026 22:45:02 +0200 Subject: [PATCH 2/5] feat(nixvim): integrate ArchLens Install the published ArchLens package, add its project-relationship keymap and ast-grep defaults, and pin the flake input to the latest validated ArchLens revision. Signed-off-by: Roel de Cort --- README.md | 1 + config/auto_cmds.nix | 1 + config/default.nix | 1 + config/plugins/utils/archlens.nix | 36 +++++++++++++++++++++++++++++++ flake.lock | 27 +++++++++++++++++++++++ flake.nix | 9 ++++++++ 6 files changed, 75 insertions(+) create mode 100644 config/plugins/utils/archlens.nix diff --git a/README.md b/README.md index a82e66a1..4eb4a250 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ home-manager.users..home.packages = [ ### Utils +- `archlens.nix`: Installs and configures the published ArchLens Neovim plugin. - `trouble.nix`: Provides persistent diagnostics, quickfix, location-list, and TODO triage views. - `overseer.nix`: Runs bounded, repo-aware validation tasks while keeping persistent sessions in cmux. - `telescope.nix`: Configures the Telescope plugin for fuzzy finding and picking. diff --git a/config/auto_cmds.nix b/config/auto_cmds.nix index 3c363286..05eb6d25 100644 --- a/config/auto_cmds.nix +++ b/config/auto_cmds.nix @@ -23,6 +23,7 @@ event = [ "FileType" ]; pattern = [ "help" + "archlens" "snacks_dashboard" "neo-tree" "Trouble" diff --git a/config/default.nix b/config/default.nix index 884f595d..e9bb8700 100644 --- a/config/default.nix +++ b/config/default.nix @@ -50,6 +50,7 @@ _: { ./plugins/git/gitsigns.nix # Utils + ./plugins/utils/archlens.nix ./plugins/utils/trouble.nix ./plugins/utils/overseer.nix ./plugins/utils/telescope.nix diff --git a/config/plugins/utils/archlens.nix b/config/plugins/utils/archlens.nix new file mode 100644 index 00000000..60c1755f --- /dev/null +++ b/config/plugins/utils/archlens.nix @@ -0,0 +1,36 @@ +{ + archlens, + lib, + pkgs, + ... +}: +{ + extraPlugins = [ archlens ]; + extraPackagesAfter = [ pkgs.ast-grep ]; + + extraConfigLua = lib.mkAfter '' + require("archlens").setup({ + width = 64, + max_items = 8, + include_external = false, + ast_grep = { + command = "${lib.getExe pkgs.ast-grep}", + timeout_ms = 15000, + max_results = 80, + min_name_length = 5, + }, + }) + ''; + + keymaps = [ + { + mode = "n"; + key = "cm"; + action = "ArchLensHere"; + options = { + desc = "Map local and project relationships"; + silent = true; + }; + } + ]; +} diff --git a/flake.lock b/flake.lock index 1e8bbea2..b7a15d13 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,31 @@ { "nodes": { + "archlens": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "nixpkgs" + ], + "nixvim": [ + "nixvim" + ] + }, + "locked": { + "lastModified": 1785703421, + "narHash": "sha256-M12DGTZwOyxU/UptyE2T9YFA8InGQtLkmiBG7pwB0SU=", + "owner": "dc-tec", + "repo": "archlens", + "rev": "3eb4ed7514b9bba3175a270b12e3126279ea0fe4", + "type": "github" + }, + "original": { + "owner": "dc-tec", + "repo": "archlens", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -216,6 +242,7 @@ }, "root": { "inputs": { + "archlens": "archlens", "flake-parts": "flake-parts", "md-render": "md-render", "mmdr": "mmdr", diff --git a/flake.nix b/flake.nix index 96acf752..b8c1b12f 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,14 @@ pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; }; + archlens = { + url = "github:dc-tec/archlens"; + inputs = { + flake-parts.follows = "flake-parts"; + nixpkgs.follows = "nixpkgs"; + nixvim.follows = "nixvim"; + }; + }; md-render = { url = "github:delphinus/md-render.nvim/v3.4.0"; flake = false; @@ -52,6 +60,7 @@ module = import ./config; # import the module directly # You can use `extraSpecialArgs` to pass additional arguments to your module files extraSpecialArgs = { + archlens = inputs.archlens.packages.${system}.default; mdRender = inputs.md-render; mmdr = inputs.mmdr.packages.${system}.default; }; From 7f7cb44e19399d86ed93e17dd6306bd9b3482ffe Mon Sep 17 00:00:00 2001 From: Roel de Cort Date: Mon, 3 Aug 2026 01:28:04 +0200 Subject: [PATCH 3/5] chore(deps): update ArchLens input Advance the nixvim lock to ArchLens af78874 so the installed plugin includes the validated project relationship, scope filtering, and provider test slices. Signed-off-by: Roel de Cort --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index b7a15d13..e30ca70d 100644 --- a/flake.lock +++ b/flake.lock @@ -13,11 +13,11 @@ ] }, "locked": { - "lastModified": 1785703421, - "narHash": "sha256-M12DGTZwOyxU/UptyE2T9YFA8InGQtLkmiBG7pwB0SU=", + "lastModified": 1785713179, + "narHash": "sha256-oLeRPm6OW3ooKyttCOKbY6+aCTA6Y9TuoA8N1bCbs5I=", "owner": "dc-tec", "repo": "archlens", - "rev": "3eb4ed7514b9bba3175a270b12e3126279ea0fe4", + "rev": "af788744d6f6b98809586537d26bb43754117d86", "type": "github" }, "original": { From 1984d21c9d5c9536f974865f1815a83c48d980eb Mon Sep 17 00:00:00 2001 From: Roel de Cort Date: Mon, 3 Aug 2026 08:38:46 +0200 Subject: [PATCH 4/5] feat(archlens): enable inbound module relationships Signed-off-by: Roel de Cort --- config/plugins/utils/archlens.nix | 10 +++++++++- flake.lock | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/config/plugins/utils/archlens.nix b/config/plugins/utils/archlens.nix index 60c1755f..704a679d 100644 --- a/config/plugins/utils/archlens.nix +++ b/config/plugins/utils/archlens.nix @@ -6,7 +6,10 @@ }: { extraPlugins = [ archlens ]; - extraPackagesAfter = [ pkgs.ast-grep ]; + extraPackagesAfter = [ + pkgs.ast-grep + pkgs.ripgrep + ]; extraConfigLua = lib.mkAfter '' require("archlens").setup({ @@ -19,6 +22,11 @@ max_results = 80, min_name_length = 5, }, + imports = { + inbound = { + command = "${lib.getExe pkgs.ripgrep}", + }, + }, }) ''; diff --git a/flake.lock b/flake.lock index e30ca70d..9eb1960d 100644 --- a/flake.lock +++ b/flake.lock @@ -13,11 +13,11 @@ ] }, "locked": { - "lastModified": 1785713179, - "narHash": "sha256-oLeRPm6OW3ooKyttCOKbY6+aCTA6Y9TuoA8N1bCbs5I=", + "lastModified": 1785738998, + "narHash": "sha256-3uhXT7heuM1plzzRsEZ06KtsPs9Enuuo8+Dbi6uK9WE=", "owner": "dc-tec", "repo": "archlens", - "rev": "af788744d6f6b98809586537d26bb43754117d86", + "rev": "2f9476f38479097383080f69daf6a89d037ee36a", "type": "github" }, "original": { From 01490251b1182c7d9fccfbf54731afa1fd515d83 Mon Sep 17 00:00:00 2001 From: Roel de Cort Date: Mon, 3 Aug 2026 11:11:30 +0200 Subject: [PATCH 5/5] chore(deps): update ArchLens input Advance the Nixvim lock to ArchLens 1c5454f so the installed plugin includes the provider orchestration, configurable section state, expanded language support, and relationship evidence improvements. Signed-off-by: Roel de Cort --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 9eb1960d..3197f348 100644 --- a/flake.lock +++ b/flake.lock @@ -13,11 +13,11 @@ ] }, "locked": { - "lastModified": 1785738998, - "narHash": "sha256-3uhXT7heuM1plzzRsEZ06KtsPs9Enuuo8+Dbi6uK9WE=", + "lastModified": 1785754423, + "narHash": "sha256-xYVTi6/3p4bFqoTYKrgUqXBQP8H1ZOq5qv7aqW6AcQ4=", "owner": "dc-tec", "repo": "archlens", - "rev": "2f9476f38479097383080f69daf6a89d037ee36a", + "rev": "1c5454f1d559c1e1b9744ea8b31037cc3ce44aa7", "type": "github" }, "original": {