mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
Declaratively manage plugins not in nixpkgs
Created the plugins/plugin-defs.nix file, which will include definitions for all plugins not in nixpkgs. This way, we can get rid of the packer dependency and make the whole thing truly declarative!
This commit is contained in:
parent
5249bd7420
commit
ff824e9dba
2 changed files with 19 additions and 6 deletions
16
plugins/plugin-defs.nix
Normal file
16
plugins/plugin-defs.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
# This is for plugins not in nixpkgs
|
||||
# e.g. intellitab.nvim
|
||||
# Ideally, in the future, this would all be specified as a flake input!
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
intellitab-nvim = pkgs.vimUtils.buildVimPlugin rec {
|
||||
pname = "intellitab-nvim";
|
||||
version = "a6c1a505865f6131866d609c52440306e9914b16";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "pta2002";
|
||||
repo = "intellitab.nvim";
|
||||
rev = version;
|
||||
sha256 = "19my464jsji7cb81h0agflzb0vmmb3f5kapv0wwhpdddcfzvp4fg";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.programs.nixvim.plugins.comment-nvim;
|
||||
helpers = import ../helpers.nix { inherit lib; };
|
||||
defs = import ../plugin-defs.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
@ -13,12 +13,9 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
maps.insert."<Tab>" = "<CMD>lua require([[intellitab]]).indent()<CR>";
|
||||
plugins.packer = {
|
||||
enable = true;
|
||||
plugins = [ "pta2002/intellitab.nvim" ];
|
||||
};
|
||||
extraPlugins = [ defs.intellitab-nvim ];
|
||||
|
||||
maps.insert."<Tab>" = "<CMD>lua require([[intellitab]]).indent()<CR>";
|
||||
plugins.treesitter = {
|
||||
indent = true;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue