39 lines
675 B
Nix
39 lines
675 B
Nix
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
cfg = config.myConfig.shell.neovim;
|
|
in {
|
|
options.myConfig.shell.neovim = {
|
|
enable = lib.mkEnableOption "neovim";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
programs.neovim = {
|
|
enable = true;
|
|
defaultEditor = true;
|
|
plugins = with pkgs.vimPlugins; [
|
|
lazy-nvim
|
|
nvim-treesitter-parsers.rust
|
|
];
|
|
extraLuaConfig = ''
|
|
require "lazy_setup"
|
|
'';
|
|
extraPackages = with pkgs; [
|
|
gnumake
|
|
clang
|
|
gcc
|
|
zig
|
|
cargo
|
|
rust-analyzer
|
|
rustup
|
|
nodejs
|
|
];
|
|
};
|
|
|
|
home.file.".config/nvim/lua".source = ./nvim-lua;
|
|
};
|
|
}
|