This commit is contained in:
Michael Zhang 2021-09-09 11:24:03 -05:00
parent 583e0fb344
commit 3830722f67
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
2 changed files with 29 additions and 10 deletions

5
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"vim.insertModeKeyBindings": [
{ "before": ["k", "j"], "after": ["<Esc>"] }
]
}

View file

@ -13,6 +13,7 @@
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
agda = pkgs.agda.withPackages (p: [
p.standard-library
(p.mkDerivation {
@ -28,22 +29,35 @@
src = plfa;
})
]);
emacsWithPackages = (pkgs.emacsPackagesFor pkgs.emacs).emacsWithPackages
(epkgs: (with epkgs.melpaPackages; [
gruvbox-theme
agda2-mode
evil
]) ++ (with epkgs.elpaPackages; [
undo-tree
]));
agda-mode = pkgs.vscode-utils.extensionFromVscodeMarketplace {
name = "agda-mode";
publisher = "banacorn";
version = "0.2.19";
sha256 = "2PFfFySOoxFEZdYb2BF6XQeYEygbTn/WJub/8IKfc1Y=";
};
combinedExtensionsDrv = pkgs.buildEnv {
name = "vscodium-extensions";
paths = [
agda-mode
pkgs.vscode-extensions.vscodevim.vim
];
};
vscodium = pkgs.runCommand "vscodium-with-extensions" {
nativeBuildInputs = [ pkgs.makeWrapper ];
buildInputs = [ pkgs.vscodium ];
meta = pkgs.vscodium.meta;
} ''
mkdir -p $out/bin
makeWrapper "${pkgs.vscodium}/bin/codium" "$out/bin/codium" \
--add-flags "--extensions-dir ${combinedExtensionsDrv}/share/vscode/extensions"
'';
in
{
devShell = pkgs.mkShell {
buildInputs = [
emacsWithPackages
agda
pkgs.vscodium
vscodium
];
};
}