mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 09:18:38 +02:00
plugins: Add tagbar (#156)
* plugins: Add tagbar * tagbar: fix typo --------- Co-authored-by: Pedro Alves <pta2002@pta2002.com>
This commit is contained in:
parent
e5ef91be0b
commit
b6e01b9100
2 changed files with 36 additions and 0 deletions
|
@ -27,6 +27,7 @@
|
|||
./languages/nix.nix
|
||||
./languages/plantuml-syntax.nix
|
||||
./languages/rust.nix
|
||||
./languages/tagbar.nix
|
||||
./languages/treesitter.nix
|
||||
./languages/treesitter-context.nix
|
||||
./languages/treesitter-refactor.nix
|
||||
|
|
35
plugins/languages/tagbar.nix
Normal file
35
plugins/languages/tagbar.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue