68 lines
1.7 KiB
Nix
68 lines
1.7 KiB
Nix
{ config, lib, pkgs, inputs, ... }:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.my.programs.nvim;
|
|
in
|
|
{
|
|
imports = lib.my.listModulesRec ./plugins;
|
|
|
|
options.my.programs.nvim.enable = mkEnableOption "nvim";
|
|
|
|
config = mkIf cfg.enable {
|
|
my.nixpkgs.overlays = [
|
|
(
|
|
_: prev:
|
|
with lib.my;
|
|
{
|
|
vimPlugins = prev.vimPlugins // {
|
|
nvim-treesitter = prev.vimPlugins.nvim-treesitter.overrideAttrs (_: {
|
|
version = mkVersionInput inputs.nvim-treesitter;
|
|
src = inputs.nvim-treesitter;
|
|
});
|
|
|
|
# HACK: to fix error in nixpkgs version of nvim-lspconfig
|
|
nvim-lspconfig = prev.vimPlugins.nvim-lspconfig.overrideAttrs (_: {
|
|
version = mkVersionInput inputs.nvim-lspconfig;
|
|
src = inputs.nvim-lspconfig;
|
|
});
|
|
};
|
|
}
|
|
)
|
|
];
|
|
home-manager.users.moritz = {
|
|
programs.neovim = {
|
|
enable = true;
|
|
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
|
|
vimAlias = true;
|
|
vimdiffAlias = true;
|
|
withNodeJs = true;
|
|
withPython3 = true;
|
|
extraPackages = with pkgs;
|
|
[
|
|
alejandra
|
|
checkmake
|
|
codespell
|
|
deadnix
|
|
dotenv-linter
|
|
fish
|
|
jq
|
|
nil
|
|
nixd
|
|
nixpkgs-fmt
|
|
nodePackages.bash-language-server
|
|
nodePackages.jsonlint
|
|
shellcheck
|
|
shfmt
|
|
statix
|
|
taplo
|
|
stable.yamlfix
|
|
yamllint
|
|
];
|
|
extraLuaConfig = readFile ./options.lua;
|
|
lazy.enable = true;
|
|
};
|
|
};
|
|
};
|
|
}
|