forked from nix-community/nixvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3285bbd
commit e1b39b7
Showing
2 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ lib, ... }: | ||
let | ||
inherit (lib) types; | ||
inherit (lib.nixvim) defaultNullOpts mkNullOrStr; | ||
in | ||
lib.nixvim.plugins.mkNeovimPlugin { | ||
name = "fugit2"; | ||
packPathName = "fugit2.nvim"; | ||
package = "fugit2-nvim"; | ||
|
||
maintainers = [ lib.maintainers.GaetanLepage ]; | ||
|
||
settingsOptions = { | ||
width = defaultNullOpts.mkNullable (with types; either str ints.unsigned) 100 '' | ||
Main popup width. | ||
''; | ||
|
||
max_width = defaultNullOpts.mkNullable (with types; either str ints.unsigned) "80%" '' | ||
Main popup width when expand patch view. | ||
''; | ||
|
||
min_width = defaultNullOpts.mkUnsignedInt 50 '' | ||
File view width when expand patch view. | ||
''; | ||
|
||
content_width = defaultNullOpts.mkUnsignedInt 60 '' | ||
File view content width. | ||
''; | ||
|
||
height = defaultNullOpts.mkNullable (with types; either str ints.unsigned) "60%" '' | ||
Main popup height. | ||
''; | ||
|
||
show_patch = defaultNullOpts.mkBool false '' | ||
Whether to show patch for active file when open `fugit2` main window. | ||
''; | ||
|
||
libgit2_path = mkNullOrStr '' | ||
Path to `libgit2` lib if not set via environments. | ||
''; | ||
|
||
gpgme_path = defaultNullOpts.mkStr "gpgme" '' | ||
Path to the `gpgme` lib. | ||
''; | ||
|
||
external_diffview = defaultNullOpts.mkBool false '' | ||
Whether to use external diffview.nvim or Fugit2 implementation. | ||
''; | ||
|
||
blame_priority = defaultNullOpts.mkUnsignedInt 1 '' | ||
Priority of blame virtual text. | ||
''; | ||
|
||
blame_info_width = defaultNullOpts.mkUnsignedInt 60 '' | ||
Width of blame hunk detail popup. | ||
''; | ||
|
||
blame_info_height = defaultNullOpts.mkUnsignedInt 10 '' | ||
Height of blame hunk detail popup. | ||
''; | ||
|
||
colorscheme = mkNullOrStr '' | ||
Custom colorscheme specification. | ||
''; | ||
}; | ||
|
||
settingsExample = { | ||
width = "62%"; | ||
height = "90%"; | ||
external_diffview = true; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
empty = { | ||
plugins.fugit2.enable = true; | ||
}; | ||
|
||
defaults = { | ||
plugins.fugit2 = { | ||
enable = true; | ||
|
||
settings = { | ||
width = 100; | ||
max_width = "80%"; | ||
min_width = 50; | ||
content_width = 60; | ||
height = "60%"; | ||
show_patch = false; | ||
libgit2_path = null; | ||
gpgme_path = "gpgme"; | ||
external_diffview = false; | ||
blame_priority = 1; | ||
blame_info_width = 60; | ||
blame_info_height = 10; | ||
colorscheme = null; | ||
}; | ||
}; | ||
}; | ||
|
||
example = { | ||
plugins.fugit2 = { | ||
enable = true; | ||
|
||
settings = { | ||
width = "62%"; | ||
height = "90%"; | ||
external_diffview = true; | ||
}; | ||
}; | ||
}; | ||
} |