Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ home-manager.users.<user>.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.
Expand Down
1 change: 1 addition & 0 deletions config/auto_cmds.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
event = [ "FileType" ];
pattern = [
"help"
"archlens"
"snacks_dashboard"
"neo-tree"
"Trouble"
Expand Down
1 change: 1 addition & 0 deletions config/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions config/plugins/lsp/ocaml.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand Down
44 changes: 44 additions & 0 deletions config/plugins/utils/archlens.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
archlens,
lib,
pkgs,
...
}:
{
extraPlugins = [ archlens ];
extraPackagesAfter = [
pkgs.ast-grep
pkgs.ripgrep
];

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,
},
imports = {
inbound = {
command = "${lib.getExe pkgs.ripgrep}",
},
},
})
'';

keymaps = [
{
mode = "n";
key = "<leader>cm";
action = "<cmd>ArchLensHere<cr>";
options = {
desc = "Map local and project relationships";
silent = true;
};
}
];
}
25 changes: 25 additions & 0 deletions config/plugins/utils/telescope.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{ pkgs, ... }:
{
extraPlugins = [ pkgs.vimPlugins.telescope-hierarchy-nvim ];

plugins.telescope = {
enable = true;
enabledExtensions = [ "hierarchy" ];
extensions = {
file-browser = {
enable = true;
Expand All @@ -18,6 +22,11 @@
};
sorting_strategy = "ascending";
};
extensions.hierarchy = {
initial_multi_expand = false;
multi_depth = 5;
layout_strategy = "horizontal";
};
};
keymaps = {
"<leader><space>" = {
Expand Down Expand Up @@ -173,6 +182,22 @@
};
};
keymaps = [
{
mode = "n";
key = "<leader>ci";
action = "<cmd>Telescope hierarchy incoming_calls<cr>";
options = {
desc = "Incoming call hierarchy";
};
}
{
mode = "n";
key = "<leader>co";
action = "<cmd>Telescope hierarchy outgoing_calls<cr>";
options = {
desc = "Outgoing call hierarchy";
};
}
{
mode = "n";
key = "<leader>sd";
Expand Down
12 changes: 12 additions & 0 deletions config/plugins/utils/trouble.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ _: {
};

keymaps = [
{
mode = "n";
key = "<leader>cs";
action = "<cmd>Trouble symbols toggle focus=false<cr>";
options.desc = "Document symbols";
}
{
mode = "n";
key = "<leader>cl";
action = "<cmd>Trouble lsp toggle focus=false win.position=right<cr>";
options.desc = "LSP locations";
}
{
mode = "n";
key = "<leader>xx";
Expand Down
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
};
Expand Down