mirror of
https://github.com/nix-community/nixvim.git
synced 2026-09-27 09:36:17 -04: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:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user