Add support for lean.

main
Joshua Potter 2023-11-19 21:00:33 -07:00
parent ad4ce28eec
commit 73530c939b
4 changed files with 43 additions and 10 deletions

View File

@ -13,7 +13,9 @@
packages = with pkgs; [ packages = with pkgs; [
anki-bin anki-bin
bitwarden bitwarden
elan
firefox firefox
gnumake
mullvad-vpn mullvad-vpn
python3 python3
wezterm wezterm

View File

@ -1,13 +1,6 @@
{ config, pkgs, lib, ... }: args @ { config, pkgs, lib, ... }:
let let
pluginGit = rev: repo: pkgs.vimUtils.buildVimPluginFrom2Nix { utils = import ./utils.nix args;
pname = "${lib.strings.sanitizeDerivationName repo}";
version = builtins.substring 0 7 rev;
src = builtins.fetchGit {
url = "https://github.com/${repo}.git";
rev = rev;
};
};
lualine-nvim = { lualine-nvim = {
plugin = pkgs.vimPlugins.lualine-nvim; plugin = pkgs.vimPlugins.lualine-nvim;
@ -24,7 +17,7 @@ let
}; };
nvim-dap = { nvim-dap = {
plugin = pluginGit plugin = utils.pluginGit
"e154fdb6d70b3765d71f296e718b29d8b7026a63" "e154fdb6d70b3765d71f296e718b29d8b7026a63"
"mfussenegger/nvim-dap"; "mfussenegger/nvim-dap";
config = config.programs.neovim.nvim-dap; config = config.programs.neovim.nvim-dap;
@ -72,6 +65,7 @@ in
}; };
imports = [ imports = [
./lang/lean.nix
./lang/lua.nix ./lang/lua.nix
./lang/nix.nix ./lang/nix.nix
./lang/python.nix ./lang/python.nix

View File

@ -0,0 +1,26 @@
args @ { pkgs, ... }:
let
utils = import ../utils.nix args;
lean-nvim = {
plugin = utils.pluginGit
"47ff75ce2fcc319fe7d8e031bc42a75473919b93"
"Julian/lean.nvim";
config = ''
lua << EOF
require('lean').setup {
abbreviations = { builtin = true },
mappings = true,
}
EOF
'';
};
in
{
programs.neovim = {
plugins = [
lean-nvim
pkgs.vimPlugins.plenary-nvim
];
};
}

11
jrpotter/neovim/utils.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, lib, ... }:
{
pluginGit = rev: repo: pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "${lib.strings.sanitizeDerivationName repo}";
version = builtins.substring 0 7 rev;
src = builtins.fetchGit {
url = "https://github.com/${repo}.git";
rev = rev;
};
};
}