nix-community.nixvim/plugins/utils/intellitab.nix
Pedro Alves ff824e9dba 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!
2021-12-12 12:39:08 +00:00

24 lines
526 B
Nix

{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.programs.nixvim.plugins.comment-nvim;
defs = import ../plugin-defs.nix { inherit pkgs; };
in
{
options = {
programs.nixvim.plugins.intellitab = {
enable = mkEnableOption "intellitab.nvim";
};
};
config = mkIf cfg.enable {
programs.nixvim = {
extraPlugins = [ defs.intellitab-nvim ];
maps.insert."<Tab>" = "<CMD>lua require([[intellitab]]).indent()<CR>";
plugins.treesitter = {
indent = true;
};
};
};
}