1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-12-08 10:01:07 +01:00
nixvim/plugins/languages/tagbar.nix
Gaétan Lepage b6e01b9100
plugins: Add tagbar (#156)
* plugins: Add tagbar

* tagbar: fix typo

---------

Co-authored-by: Pedro Alves <pta2002@pta2002.com>
2023-02-14 19:50:47 +00:00

35 lines
748 B
Nix

{ pkgs
, lib
, config
, ...
}:
let
cfg = config.plugins.tagbar;
helpers = import ../helpers.nix { inherit lib; };
in
with lib;
{
options.plugins.tagbar = {
enable = mkEnableOption "tagbar";
package = helpers.mkPackageOption "tagbar" pkgs.vimPlugins.tagbar;
extraConfig = helpers.mkNullOrOption types.attrs ''
The configuration options for tagbar without the 'tagbar_' prefix.
Example: To set 'tagbar_show_tag_count' to 1, write
extraConfig = {
show_tag_count= true;
};
'';
};
config = mkIf cfg.enable {
extraPlugins = [ cfg.package ];
extraPackages = [ pkgs.ctags ];
globals = mapAttrs' (name: value: nameValuePair ("tagbar_" + name) value) cfg.extraConfig;
};
}