Vim: Difference between revisions

imported>Edrex
m fix broken link to vim-utils.nix
imported>Aabccd021
No edit summary
Line 192: Line 192:
};
};
</syntaxHighlight>
</syntaxHighlight>
==== Using flake ====
<code>configuration.nix</code>:
<syntaxHighlight lang="nix">
{ inputs, ... }:
{
  nixpkgs = {
    overlays = [
      (self: super:
        let
          winresizer-vim = super.vimUtils.buildVimPlugin {
            name = "winresizer-vim";
            src = inputs.winresizer-vim;
          };
        in
        {
          vimPlugins =
            super.vimPlugins // {
              inherit winresizer-vim;
            };
        }
      )
    ];
  };
</syntaxHighlight>
<code>flake.nix</code>:
<syntaxHighlight lang="nix">
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
    winresizer-vim = {
      url = "github:simeji/winresizer";
      flake = false;
    };
  };
  outputs = inputs@{ nixpkgs, ... }: {
    nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = { inherit inputs; };
      modules = [
        ./configuration.nix
        ./hardware-configuration.nix
        { nix.registry.nixpkgs.flake = nixpkgs; }
      ];
    };
  };
}
</syntaxHighlight>
Then we can update the package with <code>nix flake lock --update-input winresizer-vim</code>, or update all inputs in flake.nix with <code>nix flake update</code>.


=== Vim as a Python IDE ===
=== Vim as a Python IDE ===