Compare commits
No commits in common. "main" and "avante" have entirely different histories.
@ -1,11 +1,5 @@
|
||||
{
|
||||
"diagnostics.disable": [
|
||||
"missing-fields"
|
||||
],
|
||||
"diagnostics.globals": [
|
||||
"vim",
|
||||
"make_avante_system_prompt",
|
||||
"update_avante_system_prompt",
|
||||
"get_server_list_prompt"
|
||||
]
|
||||
}
|
4
Makefile
4
Makefile
@ -1,5 +1,5 @@
|
||||
%-darwin:
|
||||
sudo darwin-rebuild --flake ./nix/base-system $*
|
||||
darwin-rebuild --flake ./nix/base-system $*
|
||||
|
||||
update-input-%:
|
||||
nix flake update $* ./nix/base-system/
|
||||
nix flake lock --update-input $* ./nix/base-system/
|
||||
|
@ -6,11 +6,10 @@ in
|
||||
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
enable = true;
|
||||
# SEE: https://github.com/NixOS/nix/issues/4119#issuecomment-1734738812
|
||||
settings.sandbox = "relaxed";
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
experimental-features = nix-command flakes repl-flake
|
||||
extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux
|
||||
trusted-users = root zaphar
|
||||
'';
|
||||
@ -45,10 +44,6 @@ in
|
||||
# };
|
||||
#};
|
||||
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
user="zaphar";
|
||||
};
|
||||
services.my-lorri.enable = true;
|
||||
services.durnitisp.enable = true;
|
||||
services.node-exporter.enable = true;
|
||||
@ -348,6 +343,9 @@ in
|
||||
vfkit
|
||||
];
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
|
||||
#services.spacebar.enable = true;
|
||||
#services.spacebar.package = "${pkgs.spacebar}";
|
||||
|
||||
@ -363,7 +361,6 @@ in
|
||||
(allow file-read* file-write* process-exec mach-lookup (subpath "${builtins.storeDir}"))
|
||||
'';
|
||||
};
|
||||
system.primaryUser = "zaphar";
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 4;
|
||||
|
434
nix/base-system/flake.lock
generated
434
nix/base-system/flake.lock
generated
@ -20,38 +20,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"avante-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1746602870,
|
||||
"narHash": "sha256-REBOplEe2muqfVLwcpTAmXpTrHlzSfhbh8T0litDTDA=",
|
||||
"owner": "yetone",
|
||||
"repo": "avante.nvim",
|
||||
"rev": "113913355a6b9c0fbd62cf52d0cf3e5671d0e34a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "yetone",
|
||||
"repo": "avante.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"claude-code-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1749595024,
|
||||
"narHash": "sha256-jKWm3lN5nyZ1BsIKMFt4EQhb0n+iyEyOw79Rj/A3yZI=",
|
||||
"owner": "greggh",
|
||||
"repo": "claude-code.nvim",
|
||||
"rev": "275c47615f4424a0329290ce1d0c18a8320fd8b0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "greggh",
|
||||
"repo": "claude-code.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"clio-flake": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
@ -78,11 +46,8 @@
|
||||
},
|
||||
"custom-flakes": {
|
||||
"inputs": {
|
||||
"avante-src": "avante-src",
|
||||
"claude-code-nvim-src": "claude-code-nvim-src",
|
||||
"d2-vim-src": "d2-vim-src",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"gomod2nix-src": "gomod2nix-src",
|
||||
"hunk-nvim-src": "hunk-nvim-src",
|
||||
"ionide-nvim-src": "ionide-nvim-src",
|
||||
"naersk": "naersk_2",
|
||||
@ -96,14 +61,15 @@
|
||||
"rust-overlay": "rust-overlay_3",
|
||||
"tree-sitter-cli-src": "tree-sitter-cli-src",
|
||||
"treesitter-context": "treesitter-context",
|
||||
"victoria-logs-src": "victoria-logs-src",
|
||||
"zig-src": "zig-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751479151,
|
||||
"narHash": "sha256-JxS2yHOiScQQOk8YvK4UAGx68iQJXKnL5qNvV0+9s9A=",
|
||||
"lastModified": 1732111397,
|
||||
"narHash": "sha256-2qTl0546a5xZySPdN23gFhz48V6tA2INDjKm4NPBMTs=",
|
||||
"owner": "zaphar",
|
||||
"repo": "nix-flakes",
|
||||
"rev": "0442ff179bd8e82ca3fe713d22e258c89f9caccc",
|
||||
"rev": "be1645a420b26b5a69a734db8596351a51d5a021",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -173,16 +139,15 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749744770,
|
||||
"narHash": "sha256-MEM9XXHgBF/Cyv1RES1t6gqAX7/tvayBC1r/KPyK1ls=",
|
||||
"lastModified": 1715871485,
|
||||
"narHash": "sha256-ywapEXmBBI+DVRx/YYC6+6Lk+W8vhShz1uJNvqPKzng=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "536f951efb1ccda9b968e3c9dee39fbeb6d3fdeb",
|
||||
"rev": "cb02884fa1ff5a619a44ab5f1bcc4dedd2d623c2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"ref": "nix-darwin-25.05",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
@ -190,7 +155,7 @@
|
||||
"durnitisp-flake": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_6",
|
||||
"flake-utils": "flake-utils_5",
|
||||
"naersk": "naersk_3"
|
||||
},
|
||||
"locked": {
|
||||
@ -287,27 +252,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"mcphub-flake",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1743550720,
|
||||
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
@ -453,24 +397,6 @@
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_5": {
|
||||
"inputs": {
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
@ -485,7 +411,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_6": {
|
||||
"flake-utils_5": {
|
||||
"locked": {
|
||||
"lastModified": 1644229661,
|
||||
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
|
||||
@ -500,6 +426,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_6": {
|
||||
"inputs": {
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_7": {
|
||||
"inputs": {
|
||||
"systems": "systems_6"
|
||||
@ -523,11 +467,11 @@
|
||||
"systems": "systems_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -541,11 +485,11 @@
|
||||
"systems": "systems_8"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -575,31 +519,29 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gomod2nix-src": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"harpoon-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1745875161,
|
||||
"narHash": "sha256-0YkWCS13jpoo3+sX/3kcgdxBNt1VZTmvF+FhZb4rFKI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "gomod2nix",
|
||||
"rev": "2cbd7fdd6eeab65c494cc426e18f4e4d2a5e35c0",
|
||||
"lastModified": 1706306053,
|
||||
"narHash": "sha256-RjwNUuKQpLkRBX3F9o25Vqvpu3Ah1TCFQ5Dk4jXhsbI=",
|
||||
"owner": "ThePrimeagen",
|
||||
"repo": "harpoon",
|
||||
"rev": "a38be6e0dd4c6db66997deab71fc4453ace97f9c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "gomod2nix",
|
||||
"owner": "ThePrimeagen",
|
||||
"ref": "harpoon2",
|
||||
"repo": "harpoon",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"heracles-flake": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-utils": "flake-utils_7",
|
||||
"flake-utils": "flake-utils_6",
|
||||
"naersk": "naersk_4",
|
||||
"nixpkgs": "nixpkgs_9",
|
||||
"nixpkgs": "nixpkgs_8",
|
||||
"rust-overlay": "rust-overlay_4"
|
||||
},
|
||||
"locked": {
|
||||
@ -671,16 +613,16 @@
|
||||
},
|
||||
"jujutsu-flake": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_9",
|
||||
"nixpkgs": "nixpkgs_10",
|
||||
"flake-utils": "flake-utils_8",
|
||||
"nixpkgs": "nixpkgs_9",
|
||||
"rust-overlay": "rust-overlay_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749118509,
|
||||
"narHash": "sha256-HKqpDREmzpCskJdfUwvUMJwHTx1RHL7/XMJMUDDMVJA=",
|
||||
"lastModified": 1737911819,
|
||||
"narHash": "sha256-EsxRZIwe1EaacXj3yp1xo2pqHufr/ZLaqOPnsOmEmI0=",
|
||||
"owner": "martinvonz",
|
||||
"repo": "jj",
|
||||
"rev": "0dc9eb5187b79e3722d20f3c5e2c584edb501e1a",
|
||||
"rev": "00069119d8165c9c9b3b176c00c3171c73c05138",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -705,26 +647,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mcphub-flake": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs_11"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746274546,
|
||||
"narHash": "sha256-NdBF9cU7tyYQZBZ/dpUDami+uF7UDNqdCazyiW3uhIM=",
|
||||
"owner": "ravitemer",
|
||||
"repo": "mcphub.nvim",
|
||||
"rev": "966a95e76d35fb841e0ead972f204677c42a4d3c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ravitemer",
|
||||
"ref": "v5.0.1",
|
||||
"repo": "mcphub.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"naersk": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
@ -745,14 +667,14 @@
|
||||
},
|
||||
"naersk_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739824009,
|
||||
"narHash": "sha256-fcNrCMUWVLMG3gKC5M9CBqVOAnJtyRvGPxptQFl5mVg=",
|
||||
"lastModified": 1721727458,
|
||||
"narHash": "sha256-r/xppY958gmZ4oTfLiHN0ZGuQ+RSTijDblVgVLFi1mw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"rev": "e5130d37369bfa600144c2424270c96f0ef0e11d",
|
||||
"rev": "3fb418eaf352498f6b6c30592e3beb63df42ef11",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -763,7 +685,7 @@
|
||||
},
|
||||
"naersk_3": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_7"
|
||||
"nixpkgs": "nixpkgs_6"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1671096816,
|
||||
@ -781,7 +703,7 @@
|
||||
},
|
||||
"naersk_4": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_8"
|
||||
"nixpkgs": "nixpkgs_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1698420672,
|
||||
@ -799,7 +721,7 @@
|
||||
},
|
||||
"naersk_5": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_15"
|
||||
"nixpkgs": "nixpkgs_14"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1650101877,
|
||||
@ -817,7 +739,7 @@
|
||||
},
|
||||
"naersk_6": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_16"
|
||||
"nixpkgs": "nixpkgs_15"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721727458,
|
||||
@ -836,11 +758,11 @@
|
||||
"neogit-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1741986669,
|
||||
"narHash": "sha256-4HLSTKNqngiFrRabffthYm3Zyfqr3IJCis9yhsH2Eps=",
|
||||
"lastModified": 1728420708,
|
||||
"narHash": "sha256-8tnWF7gmIzuXN4W/Z3Xy4ID6Y+lMU14UfrZdXYoYSXo=",
|
||||
"owner": "NeogitOrg",
|
||||
"repo": "neogit",
|
||||
"rev": "333968f8222fda475d3e4545a9b15fe9912ca26a",
|
||||
"rev": "a8dd1509a7fc6bf92ca60f21e33393f685ab70aa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -865,10 +787,32 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neovim-flake": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_9",
|
||||
"nixpkgs": "nixpkgs_10"
|
||||
},
|
||||
"locked": {
|
||||
"dir": "contrib",
|
||||
"lastModified": 1715862872,
|
||||
"narHash": "sha256-FCOipXHkAbkuFw9JjEpOIJ8BkyMkjkI0Dp+SzZ4yZlw=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "27fb62988e922c2739035f477f93cc052a4fee1e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "contrib",
|
||||
"owner": "neovim",
|
||||
"ref": "stable",
|
||||
"repo": "neovim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nil-flake": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_5",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
@ -888,7 +832,7 @@
|
||||
"nil-flake_2": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_10",
|
||||
"nixpkgs": "nixpkgs_12",
|
||||
"nixpkgs": "nixpkgs_11",
|
||||
"rust-overlay": "rust-overlay_6"
|
||||
},
|
||||
"locked": {
|
||||
@ -923,53 +867,37 @@
|
||||
},
|
||||
"nixpkgs-darwin": {
|
||||
"locked": {
|
||||
"lastModified": 1749596380,
|
||||
"narHash": "sha256-7DEKr2x/jIAKkwHPNNjG6lGUz9nk8SGrbyaeAFMtN34=",
|
||||
"lastModified": 1735564410,
|
||||
"narHash": "sha256-HB/FA0+1gpSs8+/boEavrGJH+Eq08/R2wWNph1sM1Dg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "210a4a2e3d3853be3a6017e68d2897771fdace35",
|
||||
"rev": "1e7a8f391f1a490460760065fa0630b5520f9cf8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-25.05-darwin",
|
||||
"ref": "nixpkgs-24.05-darwin",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_10": {
|
||||
"locked": {
|
||||
"lastModified": 1747920628,
|
||||
"narHash": "sha256-IlAuXnIi+ZmyS89tt1YOFDCv7FKs9bNBHd3MXMp8PxE=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1715787315,
|
||||
"narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e314d5c6d3b3a0f40ec5bcbc007b0cbe412f48ae",
|
||||
"rev": "33d1e753c82ffc557b4a585c77de43d4c922ebb5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_11": {
|
||||
"locked": {
|
||||
"lastModified": 1745377448,
|
||||
"narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_12": {
|
||||
"locked": {
|
||||
"lastModified": 1690441914,
|
||||
"narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=",
|
||||
@ -985,23 +913,23 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_13": {
|
||||
"nixpkgs_12": {
|
||||
"locked": {
|
||||
"lastModified": 1749747690,
|
||||
"narHash": "sha256-FPhMfYq+ngKpZiYaOblqR6S9z9JVpTlW8EaQ98xwkkU=",
|
||||
"lastModified": 1738579205,
|
||||
"narHash": "sha256-o6BeeanSUALvz8oL2CHOikVjCf7j+HqlA0WGvKOUX3Q=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f7d4856c2d1af130193777964535304fdc76e368",
|
||||
"rev": "be5cf18b3d26ba2db938a72ade93ac8a9a7462ff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "release-25.05",
|
||||
"ref": "release-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_14": {
|
||||
"nixpkgs_13": {
|
||||
"locked": {
|
||||
"lastModified": 1689850295,
|
||||
"narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=",
|
||||
@ -1017,7 +945,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_15": {
|
||||
"nixpkgs_14": {
|
||||
"locked": {
|
||||
"lastModified": 1650109093,
|
||||
"narHash": "sha256-tqlnKrAdJktRLXTou9le0oTqrYBAFpGscV5RADdpArU=",
|
||||
@ -1031,6 +959,20 @@
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_15": {
|
||||
"locked": {
|
||||
"lastModified": 1729658218,
|
||||
"narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_16": {
|
||||
"locked": {
|
||||
"lastModified": 1729658218,
|
||||
@ -1046,20 +988,6 @@
|
||||
}
|
||||
},
|
||||
"nixpkgs_17": {
|
||||
"locked": {
|
||||
"lastModified": 1729658218,
|
||||
"narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_18": {
|
||||
"locked": {
|
||||
"lastModified": 1682109806,
|
||||
"narHash": "sha256-d9g7RKNShMLboTWwukM+RObDWWpHKaqTYXB48clBWXI=",
|
||||
@ -1091,27 +1019,11 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1658285632,
|
||||
"narHash": "sha256-zRS5S/hoeDGUbO+L95wXG9vJNwsSYcl93XiD0HQBXLk=",
|
||||
"lastModified": 1728538411,
|
||||
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5342fc6fb59d0595d26883c3cadff16ce58e44f3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "master",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1742738698,
|
||||
"narHash": "sha256-KCtAXWwQs03JmEhP4ss59QVzT+rHZkhQO85KjNy8Crc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f3a2a0601e9669a6e38af25b46ce6c4563bcb6da",
|
||||
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -1119,7 +1031,7 @@
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1726481836,
|
||||
"narHash": "sha256-MWTBH4dd5zIz2iatDb8IkqSjIeFum9jAqkFxgHLdzO4=",
|
||||
@ -1135,7 +1047,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1708296515,
|
||||
"narHash": "sha256-FyF489fYNAUy7b6dkYV6rGPyzp+4tThhr80KNAaF/yY=",
|
||||
@ -1151,7 +1063,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1678724065,
|
||||
"narHash": "sha256-MjeRjunqfGTBGU401nxIjs7PC9PZZ1FBCZp/bRB3C2M=",
|
||||
@ -1165,6 +1077,20 @@
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1708151420,
|
||||
"narHash": "sha256-MGT/4aGCWQPQiu6COqJdCj9kSpLPiShgbwpbC38YXC8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6e2f00c83911461438301db0dba5281197fe4b3a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1708151420,
|
||||
@ -1181,21 +1107,23 @@
|
||||
},
|
||||
"nixpkgs_9": {
|
||||
"locked": {
|
||||
"lastModified": 1708151420,
|
||||
"narHash": "sha256-MGT/4aGCWQPQiu6COqJdCj9kSpLPiShgbwpbC38YXC8=",
|
||||
"lastModified": 1737557748,
|
||||
"narHash": "sha256-BaMuhctP1x00+8cBE2cJveJQb70/tWHI50MHj/ZrtOY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6e2f00c83911461438301db0dba5281197fe4b3a",
|
||||
"rev": "606996d74f6e2a12635d41c1bf58bfc7ea3bb5ec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nurl-flake": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_6"
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726505596,
|
||||
@ -1213,7 +1141,7 @@
|
||||
},
|
||||
"nurl-flake_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_14"
|
||||
"nixpkgs": "nixpkgs_13"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701273941,
|
||||
@ -1237,12 +1165,13 @@
|
||||
"d2-vim-src": "d2-vim-src_2",
|
||||
"darwin": "darwin_2",
|
||||
"durnitisp-flake": "durnitisp-flake",
|
||||
"harpoon-src": "harpoon-src",
|
||||
"heracles-flake": "heracles-flake",
|
||||
"jujutsu-flake": "jujutsu-flake",
|
||||
"mcphub-flake": "mcphub-flake",
|
||||
"neogit-src": "neogit-src_2",
|
||||
"neovim-flake": "neovim-flake",
|
||||
"nil-flake": "nil-flake_2",
|
||||
"nixpkgs": "nixpkgs_13",
|
||||
"nixpkgs": "nixpkgs_12",
|
||||
"nixpkgs-darwin": "nixpkgs-darwin",
|
||||
"nurl-flake": "nurl-flake_2",
|
||||
"roslyn-lsp": "roslyn-lsp_2",
|
||||
@ -1250,6 +1179,7 @@
|
||||
"rust-overlay-flake": "rust-overlay-flake",
|
||||
"sheetsui-flake": "sheetsui-flake",
|
||||
"sile-flake": "sile-flake",
|
||||
"treesitter-context": "treesitter-context_2",
|
||||
"unstable": "unstable"
|
||||
}
|
||||
},
|
||||
@ -1381,11 +1311,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742351546,
|
||||
"narHash": "sha256-GPubFcOXyi8TVm1xpltHYPcfGr+iO+if2u/EtzFVnHQ=",
|
||||
"lastModified": 1728461096,
|
||||
"narHash": "sha256-cd0cXB85B3kGpm+iumP9xCnqFErspXL9Z/2X59kQ6c4=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "b0a7450168c62a46f87d204280e6d9d1c0292671",
|
||||
"rev": "e310b9bd71fa6c6a9fec0a8cf5af43ce798a0ad6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -1397,7 +1327,7 @@
|
||||
},
|
||||
"rust-overlay_4": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_8",
|
||||
"flake-utils": "flake-utils_7",
|
||||
"nixpkgs": [
|
||||
"heracles-flake",
|
||||
"nixpkgs"
|
||||
@ -1426,11 +1356,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1747967795,
|
||||
"narHash": "sha256-76s4jDRbQzxRO+5y8ilMp5V30qVgY9R6n8U7aOap8ig=",
|
||||
"lastModified": 1737685583,
|
||||
"narHash": "sha256-p+NVABRpGi+pT+xxf9HcLcFVxG6L+vEEy+NwzB9T0f8=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "f1d5bfa8c692cacd798a3e1fb93d54c1b9ac701a",
|
||||
"rev": "eb64cbcc8eee0fa87ebded92805280d2ec97415a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -1489,7 +1419,7 @@
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_13",
|
||||
"naersk": "naersk_6",
|
||||
"nixpkgs": "nixpkgs_17",
|
||||
"nixpkgs": "nixpkgs_16",
|
||||
"rust-overlay": "rust-overlay_7"
|
||||
},
|
||||
"locked": {
|
||||
@ -1512,7 +1442,7 @@
|
||||
"flake-utils": "flake-utils_14",
|
||||
"gitignore": "gitignore",
|
||||
"libtexpdf-src": "libtexpdf-src",
|
||||
"nixpkgs": "nixpkgs_18"
|
||||
"nixpkgs": "nixpkgs_17"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694595810,
|
||||
@ -1711,11 +1641,11 @@
|
||||
"tree-sitter-cli-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1742574818,
|
||||
"narHash": "sha256-aV9tifiYFMAa2u+MkfJpm4TYUfmzajfsVc5jhs2ENzU=",
|
||||
"lastModified": 1728916102,
|
||||
"narHash": "sha256-Aslud0Di5u3gaVHguEZPGkYwDJQPj6BACjo7+2wwfhE=",
|
||||
"owner": "tree-sitter",
|
||||
"repo": "tree-sitter",
|
||||
"rev": "e3db212b0b12a189010979b4c129a792009e8361",
|
||||
"rev": "fb23de926134188e2711bba2f7b589e3f25c14fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -1741,13 +1671,30 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treesitter-context_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1693236978,
|
||||
"narHash": "sha256-B6BXeFEWxTFf46JrlatsxEQcC6+/hPIDBb5cIcJpLZg=",
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter-context",
|
||||
"rev": "e6b743ccd4e780bc9cd85b707de67df72eea1a23",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter-context",
|
||||
"rev": "e6b743ccd4e780bc9cd85b707de67df72eea1a23",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1751349533,
|
||||
"narHash": "sha256-5XRh0mB06/7WYDLu9ZXsx1GhyvvNVZDtPyg34sUCLJs=",
|
||||
"lastModified": 1742923925,
|
||||
"narHash": "sha256-biPjLws6FiBVUUDHEMFq5pUQL84Wf7PntPYdo3oKkFw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bdfd0f2afcf764e531d0960c821ab070a6174b15",
|
||||
"rev": "25d1b84f5c90632a623c48d83a2faf156451e6b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -1755,6 +1702,23 @@
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"victoria-logs-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1728382879,
|
||||
"narHash": "sha256-iaV4bjwjLqQcB//xIH16lRFry9ncxej+DLesb3pbm/4=",
|
||||
"owner": "VictoriaMetrics",
|
||||
"repo": "VictoriaMetrics",
|
||||
"rev": "6878982c93e34a2bf6ab026b3809073b284b6afc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "VictoriaMetrics",
|
||||
"ref": "v0.34.0-victorialogs",
|
||||
"repo": "VictoriaMetrics",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zig-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -1,15 +1,15 @@
|
||||
{
|
||||
inputs = {
|
||||
# Default to sane nixpkgs versions
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-25.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-24.11";
|
||||
unstable.url = "nixpkgs";
|
||||
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-25.05-darwin";
|
||||
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
|
||||
#lean4-flake = {
|
||||
# url = "github:leanprover/lean4/v4.4.0";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
#};
|
||||
darwin = {
|
||||
url = "github:lnl7/nix-darwin/nix-darwin-25.05";
|
||||
url = "github:lnl7/nix-darwin";
|
||||
# ensure that darwinSystem uses our nixpkgs version
|
||||
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||
};
|
||||
@ -31,16 +31,20 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
#neovim-flake = {
|
||||
# url = "github:neovim/neovim/stable?dir=contrib";
|
||||
# # NOTE(jeremy): Currently this needs a newer nixpkgs version
|
||||
# #inputs.nixpkgs.follows = "nixpkgs";
|
||||
#};
|
||||
neovim-flake = {
|
||||
url = "github:neovim/neovim/stable?dir=contrib";
|
||||
# NOTE(jeremy): Currently this needs a newer nixpkgs version
|
||||
#inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
jujutsu-flake.url = "github:martinvonz/jj";
|
||||
custom-flakes = {
|
||||
url = "github:zaphar/nix-flakes";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
harpoon-src = {
|
||||
url = "github:ThePrimeagen/harpoon/harpoon2";
|
||||
flake = false;
|
||||
};
|
||||
neogit-src = {
|
||||
url = "github:NeogitOrg/neogit";
|
||||
flake = false;
|
||||
@ -49,12 +53,16 @@
|
||||
url = "github:terrastruct/d2-vim";
|
||||
flake = false;
|
||||
};
|
||||
# We need to pin to this version of treesitter because it breaks after this revision
|
||||
treesitter-context = {
|
||||
url = "github:nvim-treesitter/nvim-treesitter-context/e6b743ccd4e780bc9cd85b707de67df72eea1a23";
|
||||
flake = false;
|
||||
};
|
||||
roslyn-lsp = {
|
||||
url = "github:zaphar/roslyn.nvim/main";
|
||||
flake = false;
|
||||
};
|
||||
heracles-flake.url = "github:zaphar/Heracles";
|
||||
mcphub-flake.url = "github:ravitemer/mcphub.nvim/v5.0.1";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
@ -67,30 +75,39 @@
|
||||
agenix-flake,
|
||||
nil-flake,
|
||||
nurl-flake,
|
||||
harpoon-src,
|
||||
custom-flakes,
|
||||
unstable,
|
||||
heracles-flake,
|
||||
neovim-flake,
|
||||
clio-flake,
|
||||
sheetsui-flake,
|
||||
mcphub-flake,
|
||||
... # We don't use the self or nixpkgs args here so we just glob it.
|
||||
}:
|
||||
rec {
|
||||
vimModule = system: let
|
||||
nil-pkg = nil-flake.packages."${system}".default;
|
||||
mcp-hub-binary = custom-flakes.packages."${system}".mcp-hub;
|
||||
claude-code-binary = custom-flakes.packages."${system}".claude-code;
|
||||
in
|
||||
{ config, pkgs, ...}: let
|
||||
unstablePkgs = import unstable { inherit system; };
|
||||
possession-nvim = pkgs.callPackage ./possession-nvim.nix {
|
||||
inherit (pkgs.vimUtils) buildVimPlugin;
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
};
|
||||
harpoon-nvim = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "harpoon";
|
||||
version = "2024-01-28";
|
||||
src = harpoon-src;
|
||||
};
|
||||
neogit-nvim = custom-flakes.packages."${system}".neogit-nvim;
|
||||
d2-vim = custom-flakes.packages."${system}".d2-vim;
|
||||
hunk-nvim = custom-flakes.packages."${system}".hunk-nvim;
|
||||
# TODO(zaphar): Apparently this is a remote plugin so it needs some additional love.
|
||||
#nvim-bnf = custom-flakes.packages."${system}".nvim-bnf;
|
||||
nvim-treesitter-context = custom-flakes.packages."${system}".nvim-treesitter-context;
|
||||
roslyn-nvim = custom-flakes.packages."${system}".roslyn-nvim;
|
||||
ionide-nvim = custom-flakes.packages."${system}".ionide-nvim;
|
||||
claude-code-nvim = custom-flakes.packages."${system}".claude-code-nvim;
|
||||
nvim = neovim-flake.packages."${system}".neovim;
|
||||
# TODO(zaphar): Until nixpkgs update to a newer version of tree-sitter the queries will be wrong
|
||||
# for csharp
|
||||
#tree-sitter-csharp = pkgs.callPackage ./nvim-treesitter-csharp.nix {
|
||||
@ -99,11 +116,10 @@
|
||||
# inherit (pkgs) fetchFromGitHub;
|
||||
#};
|
||||
# TODO(jwall): When this actually builds we should use it.
|
||||
#nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix {
|
||||
# inherit (pkgs.tree-sitter) buildGrammar;
|
||||
# inherit (pkgs) fetchFromGitHub;
|
||||
#};
|
||||
mcphub-nvim = mcphub-flake.packages."${system}".default;
|
||||
#nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix {
|
||||
# inherit (pkgs.tree-sitter) buildGrammar;
|
||||
# inherit (pkgs) fetchFromGitHub;
|
||||
#};
|
||||
in {
|
||||
imports = [
|
||||
./program-neovim.nix
|
||||
@ -117,117 +133,114 @@
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
custom-neovim = nvim;
|
||||
lorri = unstablePkgs.lorri;
|
||||
avante-nvim = unstablePkgs.vimPlugins.avante-nvim;
|
||||
})
|
||||
];
|
||||
programs = with unstablePkgs; {
|
||||
programs = with pkgs; {
|
||||
neovim.enable = true;
|
||||
neovim.vimAlias = true;
|
||||
neovim.viAlias = true;
|
||||
neovim.package = unstablePkgs.neovim-unwrapped;
|
||||
neovim.package = pkgs.custom-neovim;
|
||||
neovim.configure = {
|
||||
customRC = "lua << EOF
|
||||
customRC = "lua << EOF
|
||||
${builtins.readFile ./init.lua}
|
||||
EOF";
|
||||
packages.myVimPackage = {
|
||||
start = (with pkgs.vimPlugins; [
|
||||
copilot-lua
|
||||
avante-nvim
|
||||
vim-sile
|
||||
nvim-tree-lua
|
||||
nvim-lspconfig
|
||||
packer-nvim
|
||||
vim-ps1
|
||||
vim-lsp
|
||||
vim-vsnip
|
||||
nvim-cmp
|
||||
cmp-nvim-lua
|
||||
cmp-nvim-lsp
|
||||
cmp-vsnip
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-nvim-lsp-signature-help
|
||||
nvim-dap # Debug Adapter Protocol support
|
||||
#nvim-dap-ui
|
||||
hoon-vim
|
||||
nvim-treesitter
|
||||
lualine-nvim
|
||||
lualine-lsp-progress
|
||||
lean-nvim
|
||||
roslyn-nvim
|
||||
ionide-nvim # Fsharp lsp support
|
||||
nvim-treesitter-context
|
||||
nvim-treesitter-textobjects
|
||||
nvim-treesitter-parsers.ini
|
||||
nvim-treesitter-parsers.ebnf
|
||||
nvim-treesitter-parsers.rust
|
||||
nvim-treesitter-parsers.c
|
||||
#nvim-treesitter-parsers.c_sharp # currently broken for some reason
|
||||
nvim-treesitter-parsers.cpp
|
||||
nvim-treesitter-parsers.clojure
|
||||
nvim-treesitter-parsers.latex
|
||||
nvim-treesitter-parsers.terraform
|
||||
nvim-treesitter-parsers.hcl
|
||||
nvim-treesitter-parsers.yaml
|
||||
nvim-treesitter-parsers.lua
|
||||
nvim-treesitter-parsers.vim
|
||||
nvim-treesitter-parsers.go
|
||||
nvim-treesitter-parsers.toml
|
||||
nvim-treesitter-parsers.tlaplus
|
||||
nvim-treesitter-parsers.typescript
|
||||
nvim-treesitter-parsers.starlark
|
||||
nvim-treesitter-parsers.python
|
||||
nvim-treesitter-parsers.sql
|
||||
nvim-treesitter-parsers.javascript
|
||||
nvim-treesitter-parsers.ocaml
|
||||
nvim-treesitter-parsers.haskell
|
||||
nvim-treesitter-parsers.css
|
||||
nvim-treesitter-parsers.promql
|
||||
nvim-treesitter-parsers.nix
|
||||
nvim-treesitter-parsers.zig
|
||||
nvim-treesitter-parsers.hoon
|
||||
#omnisharp-extended-lsp-nvim
|
||||
#neotest-dotnet
|
||||
nix-develop-nvim
|
||||
trouble-nvim
|
||||
nightfox-nvim
|
||||
melange-nvim
|
||||
telescope-nvim
|
||||
telescope-lsp-handlers-nvim
|
||||
plenary-nvim
|
||||
vim-dadbod
|
||||
vim-dadbod-ui
|
||||
vim-dadbod-completion
|
||||
vim-dasht
|
||||
direnv-vim
|
||||
mcphub-nvim
|
||||
claude-code-nvim
|
||||
]) ++ [
|
||||
d2-vim
|
||||
hunk-nvim
|
||||
neogit-nvim
|
||||
# tree-sitter-csharp.neovim-plugin # Until nixpkgs updates their nvim-treesitter config the csharp queries will be broken
|
||||
];
|
||||
};
|
||||
packages.myVimPackage = {
|
||||
start = (with pkgs.vimPlugins; [
|
||||
avante-nvim
|
||||
vim-sile
|
||||
nvim-tree-lua
|
||||
nvim-lspconfig
|
||||
packer-nvim
|
||||
vim-ps1
|
||||
vim-lsp
|
||||
vim-vsnip
|
||||
nvim-cmp
|
||||
cmp-nvim-lua
|
||||
cmp-nvim-lsp
|
||||
cmp-vsnip
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-nvim-lsp-signature-help
|
||||
nvim-dap # Debug Adapter Protocol support
|
||||
#nvim-dap-ui
|
||||
hoon-vim
|
||||
nvim-treesitter
|
||||
lualine-nvim
|
||||
lualine-lsp-progress
|
||||
lean-nvim
|
||||
roslyn-nvim
|
||||
ionide-nvim # Fsharp lsp support
|
||||
nvim-treesitter-context
|
||||
nvim-treesitter-textobjects
|
||||
nvim-treesitter-parsers.ini
|
||||
nvim-treesitter-parsers.ebnf
|
||||
nvim-treesitter-parsers.rust
|
||||
nvim-treesitter-parsers.c
|
||||
#nvim-treesitter-parsers.c_sharp # currently broken for some reason
|
||||
nvim-treesitter-parsers.cpp
|
||||
nvim-treesitter-parsers.clojure
|
||||
nvim-treesitter-parsers.latex
|
||||
nvim-treesitter-parsers.terraform
|
||||
nvim-treesitter-parsers.hcl
|
||||
nvim-treesitter-parsers.yaml
|
||||
nvim-treesitter-parsers.lua
|
||||
nvim-treesitter-parsers.vim
|
||||
nvim-treesitter-parsers.go
|
||||
nvim-treesitter-parsers.toml
|
||||
nvim-treesitter-parsers.tlaplus
|
||||
nvim-treesitter-parsers.typescript
|
||||
nvim-treesitter-parsers.starlark
|
||||
nvim-treesitter-parsers.python
|
||||
nvim-treesitter-parsers.sql
|
||||
nvim-treesitter-parsers.javascript
|
||||
nvim-treesitter-parsers.ocaml
|
||||
nvim-treesitter-parsers.haskell
|
||||
nvim-treesitter-parsers.css
|
||||
nvim-treesitter-parsers.promql
|
||||
nvim-treesitter-parsers.nix
|
||||
nvim-treesitter-parsers.zig
|
||||
nvim-treesitter-parsers.hoon
|
||||
#omnisharp-extended-lsp-nvim
|
||||
#neotest-dotnet
|
||||
nix-develop-nvim
|
||||
trouble-nvim
|
||||
nightfox-nvim
|
||||
melange-nvim
|
||||
telescope-nvim
|
||||
telescope-lsp-handlers-nvim
|
||||
plenary-nvim
|
||||
vim-dadbod
|
||||
vim-dadbod-ui
|
||||
vim-dadbod-completion
|
||||
vim-dasht
|
||||
direnv-vim
|
||||
]) ++ [
|
||||
possession-nvim
|
||||
harpoon-nvim
|
||||
d2-vim
|
||||
hunk-nvim
|
||||
neogit-nvim
|
||||
# tree-sitter-csharp.neovim-plugin # Until nixpkgs updates their nvim-treesitter config the csharp queries will be broken
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
environment.systemPackages = (with pkgs; [
|
||||
terraform-ls
|
||||
tinymist
|
||||
nodePackages.typescript-language-server
|
||||
nodePackages.jsdoc
|
||||
# TODO find a version of the julia package that will install
|
||||
# on darwin and add it as an overlay
|
||||
nil-pkg
|
||||
lua-language-server
|
||||
lua-language-server
|
||||
rust-analyzer
|
||||
dasht
|
||||
direnv
|
||||
lorri
|
||||
devenv
|
||||
unstablePkgs.fq
|
||||
mcp-hub-binary
|
||||
claude-code-binary
|
||||
]);
|
||||
};
|
||||
};
|
||||
@ -269,7 +282,6 @@ EOF";
|
||||
uv = unstablePkgs.uv;
|
||||
quint = (pkgs.callPackage ../packages/quint/default.nix {})."@informalsystems/quint";
|
||||
quint-lsp = (pkgs.callPackage ../packages/quint/default.nix {})."@informalsystems/quint-language-server";
|
||||
ollama = unstablePkgs.ollama;
|
||||
})
|
||||
rust-overlay
|
||||
];
|
||||
@ -296,11 +308,13 @@ EOF";
|
||||
};
|
||||
};
|
||||
environment.systemPackages = (with pkgs; [
|
||||
isabelle
|
||||
sheetsui
|
||||
lean4
|
||||
quint
|
||||
quint-lsp
|
||||
terraform # TODO(jeremy): Replace with opentofu when that is an option.
|
||||
nomad
|
||||
oha
|
||||
nodejs
|
||||
gnumake
|
||||
@ -353,8 +367,6 @@ EOF";
|
||||
victoriametrics
|
||||
# TODO add sonic-pi here if it supports the arch
|
||||
unstablePkgs.dbeaver-bin
|
||||
postgresql
|
||||
unstablePkgs.ollama
|
||||
])
|
||||
#++ (with pkgs.ocamlPackages; [
|
||||
# dune_3
|
||||
@ -383,7 +395,6 @@ EOF";
|
||||
./modules/victoria-logs.nix
|
||||
./modules/vector.nix
|
||||
./modules/lorri.nix
|
||||
./modules/ollama.nix
|
||||
./darwin-configuration.nix
|
||||
];
|
||||
};
|
||||
|
@ -17,13 +17,6 @@ vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
--vim.opt.smarttab = false
|
||||
vim.opt.fileformats = "unix,dos"
|
||||
-- Recommended by Avante docs
|
||||
-- views can only be fully collapsed with the global statusline
|
||||
vim.opt.laststatus = 3
|
||||
-- formatexpr defaulted to the lsp provider by default recently
|
||||
-- which breaks `gq` and company paragraph formatting in non lsp
|
||||
-- contexts.
|
||||
vim.opt.formatexpr = ""
|
||||
|
||||
vim.g.BASH_AuthorName = 'Jeremy Wall'
|
||||
vim.g.BASH_AuthorRef = 'jw'
|
||||
@ -36,34 +29,17 @@ vim.cmd("noswapfile")
|
||||
vim.cmd("syntax on")
|
||||
vim.cmd("filetype plugin on")
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||
pattern = { "*.qnt" },
|
||||
callback = function(args)
|
||||
vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
|
||||
pattern = {"*.qnt"},
|
||||
callback = function(args)
|
||||
vim.lsp.start({
|
||||
name = 'quint',
|
||||
cmd = { 'quint-language-server', '--stdio' },
|
||||
cmd = {'quint-language-server', '--stdio'},
|
||||
root_dir = vim.fs.dirname(vim.uri_from_bufnr(args.buf))
|
||||
})
|
||||
end,
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufNewfile", "BufRead" }, {
|
||||
callback = function(args)
|
||||
-- If treesitter supports this filetype then use the treesitter fold expression
|
||||
local ft = vim.bo.filetype
|
||||
if ft and ft ~= "" then
|
||||
-- Safely check if a parser exists for this filetype
|
||||
local has_parser = pcall(function() return vim.treesitter.language.inspect(ft) end)
|
||||
if has_parser then
|
||||
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||
vim.wo.foldmethod = 'expr'
|
||||
vim.wo.foldlevel = 10
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
vim.cmd([[
|
||||
au BufNewFile,BufRead *Makefile,*.mk set noexpandtab
|
||||
]])
|
||||
@ -97,7 +73,7 @@ au BufNewFile,BufRead *.hrl filetype indent off
|
||||
]])
|
||||
|
||||
vim.cmd([[
|
||||
au BufNewFile,BufRead *.nix set tabstop=2 nosmarttab
|
||||
au BufNewFile,BufRead *.nix set tabstop=2 nosmarttab
|
||||
]])
|
||||
|
||||
vim.cmd([[
|
||||
@ -168,30 +144,25 @@ local caps = vim.tbl_deep_extend(
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
local configure_lsp = function(name, config)
|
||||
vim.lsp.enable(name)
|
||||
vim.lsp.config(name, config)
|
||||
end
|
||||
|
||||
-- Typst
|
||||
configure_lsp('tinymist', {
|
||||
lspconfig.tinymist.setup{
|
||||
capabilities = caps,
|
||||
settings = {
|
||||
exportPdf = "onSave",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
-- Terraform lsp setup
|
||||
configure_lsp('terraformls', {})
|
||||
lspconfig.terraformls.setup {}
|
||||
|
||||
-- Nix language server support
|
||||
configure_lsp('nil_ls', {
|
||||
lspconfig.nil_ls.setup {
|
||||
capabilities = caps,
|
||||
})
|
||||
}
|
||||
|
||||
require('roslyn').setup({
|
||||
-- client, bufnr
|
||||
on_attach = function(_, _)
|
||||
on_attach = function (_, _)
|
||||
--vim.notify(vim.inspect(client))
|
||||
end,
|
||||
sdk_framework = "net8.0",
|
||||
@ -199,14 +170,23 @@ require('roslyn').setup({
|
||||
log_level = "Trace",
|
||||
});
|
||||
|
||||
-- Typescript language server support
|
||||
configure_lsp('tsserver', {
|
||||
cmd = { 'typescript-language-server', '--stdio' },
|
||||
--ocaml
|
||||
lspconfig.ocamllsp.setup {
|
||||
capabilities = caps
|
||||
})
|
||||
}
|
||||
|
||||
-- Java language server support
|
||||
lspconfig.java_language_server.setup {
|
||||
capabilities = caps
|
||||
}
|
||||
|
||||
-- Typescript language server support
|
||||
lspconfig.tsserver.setup {
|
||||
capabilities = caps
|
||||
}
|
||||
|
||||
-- Rust language server support
|
||||
configure_lsp('rust_analyzer', {
|
||||
lspconfig.rust_analyzer.setup {
|
||||
settings = {
|
||||
-- https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/generated_config.adoc
|
||||
['rust-analyzer'] = {
|
||||
@ -214,11 +194,10 @@ configure_lsp('rust_analyzer', {
|
||||
}
|
||||
},
|
||||
capabilities = caps
|
||||
})
|
||||
}
|
||||
|
||||
-- lua language server setup.
|
||||
configure_lsp('lua_ls', {
|
||||
cmd = { 'lua-language-server' },
|
||||
lspconfig.lua_ls.setup {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = { version = 'LuaJIT', },
|
||||
@ -238,13 +217,7 @@ configure_lsp('lua_ls', {
|
||||
},
|
||||
},
|
||||
capabilities = caps
|
||||
})
|
||||
|
||||
configure_lsp('ty', {
|
||||
cmd = { 'ty', 'server' },
|
||||
filetypes = { 'python' },
|
||||
root_markers = { 'ty.toml', 'pyproject.toml', '.git' },
|
||||
})
|
||||
}
|
||||
|
||||
-- lsp configuration
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
@ -256,22 +229,18 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||
vim.keymap.set({ "n", "v" }, "<Leader>a", vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set("n", "<Leader>f", vim.lsp.buf.format, opts)
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
if client and client.server_capabilities.codelens then
|
||||
vim.lsp.codelens.refresh()
|
||||
end
|
||||
-- formatexpr defaulted to the lsp provider by default recently
|
||||
-- which breaks `gq` and company paragraph formatting in non lsp
|
||||
-- contexts.
|
||||
vim.bo[args.buf].formatexpr = ""
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'InsertLeave', 'CursorHold' }, {
|
||||
callback = function(args)
|
||||
local clients = vim.lsp.get_clients({ bufnr = args.buf })
|
||||
local clients = vim.lsp.get_clients({bufnr=args.buf})
|
||||
for cid = 1, #clients do
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
if clients[cid].server_capabilities.codelens then
|
||||
vim.lsp.codelens.refresh()
|
||||
break
|
||||
@ -281,8 +250,22 @@ vim.api.nvim_create_autocmd({ 'BufEnter', 'InsertLeave', 'CursorHold' }, {
|
||||
})
|
||||
|
||||
-- LSP Diagnostics Options Setup
|
||||
local sign = function(opts)
|
||||
vim.fn.sign_define(opts.name, {
|
||||
texthl = opts.name,
|
||||
text = opts.text,
|
||||
numhl = ''
|
||||
})
|
||||
end
|
||||
|
||||
sign({ name = 'DiagnosticSignError', text = '🔥' })
|
||||
sign({ name = 'DiagnosticSignWarn', text = '⚠️' })
|
||||
sign({ name = 'DiagnosticSignHint', text = '➡️' })
|
||||
sign({ name = 'DiagnosticSignInfo', text = '🗒️' })
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
signs = true,
|
||||
update_in_insert = true,
|
||||
underline = true,
|
||||
severity_sort = false,
|
||||
@ -292,14 +275,6 @@ vim.diagnostic.config({
|
||||
header = '',
|
||||
prefix = '',
|
||||
},
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = '🔥',
|
||||
[vim.diagnostic.severity.WARN] = '⚠️',
|
||||
[vim.diagnostic.severity.HINT] = '➡️',
|
||||
[vim.diagnostic.severity.INFO] = '🗒️',
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
vim.cmd([[
|
||||
@ -340,55 +315,31 @@ require('nvim-treesitter.configs').setup {
|
||||
extended_mode = true,
|
||||
max_file_lines = nil,
|
||||
},
|
||||
textobjects = {
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
["]m"] = "@function.outer",
|
||||
["]]"] = { query = "@class.outer", desc = "Next class start" },
|
||||
--
|
||||
-- You can use regex matching (i.e. lua pattern) and/or pass a list in a "query" key to group multiple queries.
|
||||
["]o"] = "@loop.*",
|
||||
-- ["]o"] = { query = { "@loop.inner", "@loop.outer" } }
|
||||
--
|
||||
-- You can pass a query group to use query from `queries/<lang>/<query_group>.scm file in your runtime path.
|
||||
-- Below example nvim-treesitter's `locals.scm` and `folds.scm`. They also provide highlights.scm and indent.scm.
|
||||
["]s"] = { query = "@local.scope", query_group = "locals", desc = "Next scope" },
|
||||
["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
|
||||
},
|
||||
goto_next_end = {
|
||||
["]M"] = "@function.outer",
|
||||
["]["] = "@class.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[m"] = "@function.outer",
|
||||
["[["] = "@class.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[M"] = "@function.outer",
|
||||
["[]"] = "@class.outer",
|
||||
},
|
||||
-- Below will go to either the start or the end, whichever is closer.
|
||||
-- Use if you want more granular movements
|
||||
-- Make it even more gradual by adding multiple queries and regex.
|
||||
goto_next = {
|
||||
["]d"] = "@conditional.outer",
|
||||
},
|
||||
goto_previous = {
|
||||
["[d"] = "@conditional.outer",
|
||||
}
|
||||
},
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = '<Leader>c',
|
||||
node_incremental = '<Leader>c',
|
||||
scope_incremental = '<Leader>ci',
|
||||
node_decremental = '<Leader>cx',
|
||||
},
|
||||
},
|
||||
--textobjects = {
|
||||
-- enable = true,
|
||||
-- select = {
|
||||
-- enable = true,
|
||||
-- lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
-- keymaps = {
|
||||
-- -- You can use the capture groups defined in textobjects.scm
|
||||
-- ['aa'] = '@parameter.outer',
|
||||
-- ['ia'] = '@parameter.inner',
|
||||
-- ['af'] = '@function.outer',
|
||||
-- ['if'] = '@function.inner',
|
||||
-- ['ac'] = '@class.outer',
|
||||
-- ['ic'] = '@class.inner',
|
||||
-- },
|
||||
-- },
|
||||
--},
|
||||
--incremental_selection = {
|
||||
-- enable = true,
|
||||
-- keymaps = {
|
||||
-- init_selection = '<Leader>c',
|
||||
-- node_incremental = '<Leader>c',
|
||||
-- scope_incremental = '<Leader>ci',
|
||||
-- node_decremental = '<Leader>cx',
|
||||
-- },
|
||||
--},
|
||||
}
|
||||
|
||||
require 'treesitter-context'.setup {
|
||||
@ -511,6 +462,33 @@ vim.keymap.set("n", "<Leader>ga", function()
|
||||
vim.cmd("!git add %")
|
||||
end)
|
||||
|
||||
require('possession').setup {
|
||||
commands = {
|
||||
save = 'SSave',
|
||||
load = 'SLoad',
|
||||
delete = 'SDelete',
|
||||
list = 'SList',
|
||||
},
|
||||
autosave = {
|
||||
current = true,
|
||||
on_load = true,
|
||||
on_quit = true,
|
||||
},
|
||||
telescope = {
|
||||
list = {
|
||||
default_action = 'load',
|
||||
mappings = {
|
||||
save = { n = '<c-x>', i = '<c-x>' },
|
||||
load = { n = '<c-v>', i = '<c-v>' },
|
||||
delete = { n = '<c-t>', i = '<c-t>' },
|
||||
rename = { n = '<c-r>', i = '<c-r>' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
telescope.load_extension('possession')
|
||||
-- https://github.com/nvim-telescope/telescope.nvim
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
@ -532,6 +510,9 @@ telescope.setup({
|
||||
},
|
||||
})
|
||||
|
||||
local harpoon = require('harpoon')
|
||||
|
||||
harpoon:setup()
|
||||
|
||||
local lean = require 'lean'
|
||||
|
||||
@ -543,13 +524,14 @@ lean.setup {
|
||||
vim.keymap.set({ "n", "v" }, "<Leader>ti", function() vim.cmd("LeanInfoviewToggle") end, opts)
|
||||
vim.keymap.set({ "n", "v" }, "<Leader>sg", function() vim.cmd("LeanGoal") end, opts)
|
||||
vim.keymap.set({ "n", "v" }, "<Leader>stg", function() vim.cmd("LeanTermGoal") end, opts)
|
||||
vim.api.nvim_set_option_value('omnifunc', 'v:lua.vim.lsp.omnifunc', { scope = "local", buf = bufnr })
|
||||
vim.api.nvim_set_option_value('omnifunc', 'v:lua.vim.lsp.omnifunc', {scope = "local", buf=bufnr})
|
||||
end
|
||||
},
|
||||
mappings = true,
|
||||
}
|
||||
|
||||
-- telescope keymaps
|
||||
vim.keymap.set("n", "<Leader>pl", telescope.extensions.possession.list)
|
||||
-- TODO(zaphar): Remove this once my muscle memory has set in.
|
||||
vim.keymap.set("n", "<Leader>nff", telescope_builtins.fd)
|
||||
vim.keymap.set("n", "<Leader>ff", telescope_builtins.fd)
|
||||
@ -558,13 +540,16 @@ vim.keymap.set("n", "<Leader>rn", vim.lsp.buf.rename)
|
||||
vim.keymap.set("n", "<Leader>sl", telescope_builtins.lsp_workspace_symbols)
|
||||
vim.keymap.set("n", "<Leader>dl", telescope_builtins.diagnostics)
|
||||
vim.keymap.set("n", "<Leader>rg", telescope_builtins.live_grep)
|
||||
vim.keymap.set("n", "<Leader>bl", function()
|
||||
telescope_builtins.buffers({
|
||||
})
|
||||
end)
|
||||
vim.keymap.set("n", "<Leader>bl", function() telescope_builtins.buffers({
|
||||
}) end)
|
||||
vim.keymap.set("n", "<leader>lds", telescope_builtins.lsp_document_symbols, { desc = "[D]ocument [S]ymbols" })
|
||||
vim.keymap.set("n", "<leader>lws", telescope_builtins.lsp_dynamic_workspace_symbols, { desc = "[W]orkspace [S]ymbols" })
|
||||
|
||||
-- harpoon keymaps
|
||||
vim.keymap.set("n", "<Leader>ha", function() harpoon:list():append() end)
|
||||
vim.keymap.set("n", "<Leader>he", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
vim.keymap.set("n", "<Leader>hj", function() harpoon:list():prev() end)
|
||||
vim.keymap.set("n", "<Leader>hk", function() harpoon:list():next() end)
|
||||
|
||||
-- codelens keymaps
|
||||
vim.keymap.set("n", "<Leader>rr", vim.lsp.codelens.run)
|
||||
@ -582,67 +567,67 @@ require('lualine').setup {
|
||||
},
|
||||
sections = {
|
||||
-- left side
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'filename' },
|
||||
lualine_c = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'filename'},
|
||||
lualine_c = {'encoding', 'fileformat', 'filetype'},
|
||||
-- right side
|
||||
lualine_x = { 'diagnostics' },
|
||||
lualine_y = { 'progress', 'lsp_progress' },
|
||||
lualine_z = { 'location' }
|
||||
lualine_x = {'diagnostics'},
|
||||
lualine_y = {'progress', 'lsp_progress'},
|
||||
lualine_z = {'location'}
|
||||
}
|
||||
}
|
||||
|
||||
-- Hunk diff tree viewer and editor. Replacement for Meld and company
|
||||
local hunk = require("hunk")
|
||||
hunk.setup({
|
||||
keys = {
|
||||
global = {
|
||||
quit = { "q" },
|
||||
accept = { "<leader><Cr>" },
|
||||
focus_tree = { "<leader>e" },
|
||||
},
|
||||
|
||||
tree = {
|
||||
expand_node = { "l", "<Right>" },
|
||||
collapse_node = { "h", "<Left>" },
|
||||
|
||||
open_file = { "<Cr>" },
|
||||
|
||||
toggle_file = { "a" },
|
||||
},
|
||||
|
||||
diff = {
|
||||
toggle_line = { "a" },
|
||||
toggle_hunk = { "A" },
|
||||
},
|
||||
keys = {
|
||||
global = {
|
||||
quit = { "q" },
|
||||
accept = { "<leader><Cr>" },
|
||||
focus_tree = { "<leader>e" },
|
||||
},
|
||||
|
||||
ui = {
|
||||
tree = {
|
||||
-- Mode can either be `nested` or `flat`
|
||||
mode = "nested",
|
||||
width = 35,
|
||||
},
|
||||
--- Can be either `vertical` or `horizontal`
|
||||
layout = "vertical",
|
||||
tree = {
|
||||
expand_node = { "l", "<Right>" },
|
||||
collapse_node = { "h", "<Left>" },
|
||||
|
||||
open_file = { "<Cr>" },
|
||||
|
||||
toggle_file = { "a" },
|
||||
},
|
||||
|
||||
icons = {
|
||||
selected = "",
|
||||
deselected = "",
|
||||
partially_selected = "",
|
||||
|
||||
folder_open = "",
|
||||
folder_closed = "",
|
||||
diff = {
|
||||
toggle_line = { "a" },
|
||||
toggle_hunk = { "A" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Called right after each window and buffer are created.
|
||||
--hooks = {
|
||||
-- ---@param _context { buf: number, tree: NuiTree, opts: table }
|
||||
-- on_tree_mount = function(_context) end,
|
||||
-- ---@param _context { buf: number, win: number }
|
||||
-- on_diff_mount = function(_context) end,
|
||||
--},
|
||||
ui = {
|
||||
tree = {
|
||||
-- Mode can either be `nested` or `flat`
|
||||
mode = "nested",
|
||||
width = 35,
|
||||
},
|
||||
--- Can be either `vertical` or `horizontal`
|
||||
layout = "vertical",
|
||||
},
|
||||
|
||||
icons = {
|
||||
selected = "",
|
||||
deselected = "",
|
||||
partially_selected = "",
|
||||
|
||||
folder_open = "",
|
||||
folder_closed = "",
|
||||
},
|
||||
|
||||
-- Called right after each window and buffer are created.
|
||||
--hooks = {
|
||||
-- ---@param _context { buf: number, tree: NuiTree, opts: table }
|
||||
-- on_tree_mount = function(_context) end,
|
||||
-- ---@param _context { buf: number, win: number }
|
||||
-- on_diff_mount = function(_context) end,
|
||||
--},
|
||||
})
|
||||
|
||||
local dap = require('dap')
|
||||
@ -683,127 +668,14 @@ dap.configurations.cs = {
|
||||
},
|
||||
}
|
||||
|
||||
local mcphub = require("mcphub")
|
||||
|
||||
mcphub.setup({
|
||||
-- This sets vim.g.mcphub_auto_approve to false by default (can also be toggled from the HUB UI with `ga`)
|
||||
config = vim.fn.expand("~/.config/mcphub/servers.json"),
|
||||
auto_approve = true,
|
||||
auto_toggle_mcp_servers = true, -- Let LLMs start and stop MCP servers automatically
|
||||
extensions = {
|
||||
avante = {
|
||||
make_slash_commands = true, -- make /slash commands from MCP server prompts
|
||||
},
|
||||
require('avante').setup ({
|
||||
provider = "openai",
|
||||
openai = {
|
||||
endpoint = "https://api.openai.com/v1",
|
||||
model = "gpt-4o", -- your desired model (or use gpt-4o, etc.)
|
||||
timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models
|
||||
temperature = 0,
|
||||
max_tokens = 8192, -- Increase this to include reasoning tokens (for reasoning models)
|
||||
--reasoning_effort = "medium", -- low|medium|high, only used for reasoning models
|
||||
},
|
||||
cmd = "mcp-hub",
|
||||
})
|
||||
|
||||
function get_server_list_prompt(hub_instance)
|
||||
-- returns a list of mcp-servers with a `name` and a list of tools with `name`
|
||||
local mcp_tool_prompt = "# MCP SERVERS\n\nThe Model Context Protocol (MCP) enables communication between the system and locally running MCP servers that provide additional tools and resources to extend your capabilities.\n\n# Connected MCP Servers\n\nWhen a server is connected, you can use the server's tools via the `use_mcp_tool` tool, and access the server's resources via the `access_mcp_resource` tool.\nNote: Server names are case sensitive and you should always use the exact full name like `Firecrawl MCP` or `src/user/main/time-mcp` etc\n\n"
|
||||
|
||||
if not hub_instance then
|
||||
return ""
|
||||
end
|
||||
|
||||
local servers = hub_instance:get_servers()
|
||||
if not servers or #servers == 0 then
|
||||
return ""
|
||||
end
|
||||
|
||||
for _, server in ipairs(servers) do
|
||||
mcp_tool_prompt = mcp_tool_prompt .. "## server name: `" .. server.name .. "`\n\n"
|
||||
|
||||
if server.capabilities and server.capabilities.tools and #server.capabilities.tools > 0 then
|
||||
mcp_tool_prompt = mcp_tool_prompt .. "Available tools:\n\n"
|
||||
for _, tool in ipairs(server.capabilities.tools) do
|
||||
mcp_tool_prompt = mcp_tool_prompt .. "- tool name: `" .. tool.name .. "`\n"
|
||||
if tool.description then
|
||||
mcp_tool_prompt = mcp_tool_prompt .. " - Description: " .. tool.description .. "\n"
|
||||
end
|
||||
end
|
||||
mcp_tool_prompt = mcp_tool_prompt .. "\n"
|
||||
end
|
||||
end
|
||||
|
||||
return mcp_tool_prompt
|
||||
end
|
||||
|
||||
function make_avante_system_prompt(hub_instance)
|
||||
return hub_instance and get_server_list_prompt(hub_instance) or ""
|
||||
end
|
||||
|
||||
function update_avante_system_prompt()
|
||||
local hub_instance = mcphub.get_hub_instance();
|
||||
local system_prompt = make_avante_system_prompt(hub_instance)
|
||||
if system_prompt then
|
||||
require("avante.config").override({system_prompt = system_prompt})
|
||||
end
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<Leader>ab", function() require('avante').get().file_selector:add_buffer_files() end)
|
||||
vim.keymap.set("n", "<Leader>af", function() require('avante').get().file_selector:add_current_buffer() end)
|
||||
|
||||
get_root_dir = function()
|
||||
-- First try to get the root path from LSP
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
local clients = vim.lsp.get_clients({ bufnr = bufnr })
|
||||
|
||||
-- Check if we have an active LSP client with a root_dir
|
||||
for _, client in ipairs(clients) do
|
||||
if client.config and client.config.root_dir then
|
||||
return client.config.root_dir
|
||||
end
|
||||
end
|
||||
|
||||
-- Fall back to file-based detection
|
||||
local root_file = vim.fs.find(function(name, path)
|
||||
return name:match('(pyproject.toml|.sln|Cargo.toml|.git)$')
|
||||
end, { upward = true })[1]
|
||||
|
||||
return root_file and vim.fs.dirname(root_file) or vim.fn.getcwd()
|
||||
end
|
||||
|
||||
require('copilot').setup({
|
||||
root_dir = get_root_dir,
|
||||
})
|
||||
|
||||
require('avante').setup({
|
||||
provider = "claude",
|
||||
mode = "planning",
|
||||
cursor_applying_provider = nil, -- default to whatever provider is configured
|
||||
claude = {
|
||||
endpoint = "https://api.anthropic.com",
|
||||
model = "claude-3-7-sonnet-20250219",
|
||||
timeout = 30000, -- Timeout in milliseconds
|
||||
temperature = 0,
|
||||
max_tokens = 20480,
|
||||
},
|
||||
copilot = {
|
||||
model = "claude-3.7-sonnet",
|
||||
},
|
||||
behavior = {
|
||||
enable_cursor_planning_mode = true,
|
||||
},
|
||||
windows = {
|
||||
ask = {
|
||||
start_insert=false,
|
||||
focus_on_apply="theirs",
|
||||
},
|
||||
},
|
||||
system_prompt = make_avante_system_prompt(mcphub.get_hub_instance()),
|
||||
custom_tools = { require("mcphub.extensions.avante").mcp_tool() },
|
||||
-- Disable these because we'll use the mcphub versions instead
|
||||
--disabled_tools = {
|
||||
-- "list_files", -- Built-in file operations
|
||||
-- "search_files",
|
||||
-- "read_file",
|
||||
-- "create_file",
|
||||
-- "rename_file",
|
||||
-- "delete_file",
|
||||
-- "create_dir",
|
||||
-- "rename_dir",
|
||||
-- "delete_dir",
|
||||
-- "bash", -- Built-in terminal access
|
||||
--},
|
||||
})
|
||||
|
@ -1,56 +0,0 @@
|
||||
{pkgs, lib, config, ...}:
|
||||
with lib;
|
||||
let
|
||||
mkLauncher = import ../../packages/darwin-launcher.nix { inherit pkgs; };
|
||||
ollamaLauncher = mkLauncher ''
|
||||
exec ${pkgs.clio}/bin/clio \
|
||||
--out-path=${config.services.ollama.stdoutPath} \
|
||||
--err-path=${config.services.ollama.stdoutPath} \
|
||||
--pid-file=${config.services.ollama.pidPath} \
|
||||
--paranoid \
|
||||
-- \
|
||||
${pkgs.ollama}/bin/ollama \
|
||||
serve
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.services.ollama = {
|
||||
enable = mkEnableOption "Enable the ollama agent";
|
||||
stdoutPath = mkOption {
|
||||
default = "/Users/${config.services.ollama.user}/config/ollama/out.log";
|
||||
};
|
||||
stderrPath = mkOption {
|
||||
default = "/Users/${config.services.ollama.user}/config/ollama/err.log";
|
||||
};
|
||||
pidPath = mkOption {
|
||||
default = "/Users/${config.services.ollama.user}/config/ollama/ollama.pid";
|
||||
};
|
||||
user = mkOption {
|
||||
default="zaphar";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
launchd.user.agents.ollama = mkIf config.services.ollama.enable {
|
||||
serviceConfig = {
|
||||
ProgramArguments = [
|
||||
"${ollamaLauncher}"
|
||||
];
|
||||
EnvironmentVariables = {
|
||||
"OLLAMA_HOST" = "127.0.0.1:11434";
|
||||
"OLLAMA_MODELS" = "/Users/${config.services.ollama.user}/config/ollama/";
|
||||
};
|
||||
RunAtLoad = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."newsyslog.d/org.nixos.ollama.conf" = mkIf config.services.ollama.enable {
|
||||
text = ''
|
||||
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
|
||||
${config.services.ollama.stdoutPath} zaphar:staff 644 10 1000 * BJ ${config.services.ollama.pidPath} 1
|
||||
${config.services.ollama.stderrPath} zaphar:staff 644 10 1000 * BJ ${config.services.ollama.pidPath} 1
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
@ -42,13 +42,6 @@ function disk_usage() {
|
||||
/run/current-system/sw/bin/du --max-depth=1 -h "${path}" 2>/dev/null
|
||||
}
|
||||
|
||||
# TODO(zaphar): Figure out why this thing doesn't come up or dies
|
||||
function restart_durnitisp() {
|
||||
sudo launchctl bootout system/org.nixos.durnitisp
|
||||
sudo launchctl bootstrap system /Library/LaunchDaemons/org.nixos.durnitisp.plist org.nixos.durnitisp
|
||||
}
|
||||
|
||||
eval "$(direnv hook zsh)"
|
||||
|
||||
export ANTHROPIC_API_KEY="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"
|
||||
export OPENAI_API_KEY="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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user