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
Showing
4 changed files
with
186 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
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
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,139 @@ | ||
{ | ||
lib, | ||
config, | ||
pkgs, | ||
... | ||
}: | ||
let | ||
inherit (lib.nixvim) defaultNullOpts; | ||
in | ||
lib.nixvim.neovim-plugin.mkNeovimPlugin config { | ||
name = "comment-box"; | ||
originalName = "comment-box.nvim"; | ||
defaultPackage = pkgs.vimPlugins.comment-box-nvim; | ||
description = '' | ||
Clarify and beautify your comments and plain text files using boxes and lines. | ||
''; | ||
|
||
maintainers = [ lib.maintainers.elythh ]; | ||
|
||
settingsOptions = { | ||
comment_style = | ||
defaultNullOpts.mkEnum | ||
[ | ||
"line" | ||
"block" | ||
"auto" | ||
] | ||
"line" | ||
'' | ||
Select the type of comments. | ||
''; | ||
|
||
doc_width = defaultNullOpts.mkInt 80 '' | ||
Width of the document. | ||
''; | ||
box_width = defaultNullOpts.mkInt 60 '' | ||
Width of the boxes. | ||
''; | ||
|
||
borders = { | ||
top = defaultNullOpts.mkStr "─" '' | ||
Symbol used to draw the top border of a box. | ||
''; | ||
|
||
bottom = defaultNullOpts.mkStr "─" '' | ||
Symbol used to draw the bottom border of a box. | ||
''; | ||
|
||
left = defaultNullOpts.mkStr "│" '' | ||
Symbol used to draw the left border of a box. | ||
''; | ||
|
||
right = defaultNullOpts.mkStr "│" '' | ||
Symbol used to draw the right border of a box. | ||
''; | ||
|
||
top_left = defaultNullOpts.mkStr "╭" '' | ||
Symbol used to draw the top left corner of a box. | ||
''; | ||
|
||
top_right = defaultNullOpts.mkStr "╮" '' | ||
Symbol used to draw the top right corner of a box. | ||
''; | ||
|
||
bottom_left = defaultNullOpts.mkStr "╰" '' | ||
Symbol used to draw the bottom left corner of a box. | ||
''; | ||
|
||
bottom_right = defaultNullOpts.mkStr "╯" '' | ||
Symbol used to draw the bottom right corner of a box. | ||
''; | ||
|
||
}; | ||
|
||
line_width = defaultNullOpts.mkInt 70 '' | ||
Width of the lines. | ||
''; | ||
|
||
lines = { | ||
line = defaultNullOpts.mkStr "─" '' | ||
Symbol used to draw a line. | ||
''; | ||
|
||
line_start = defaultNullOpts.mkStr "─" '' | ||
Symbol used to draw the start of a line. | ||
''; | ||
|
||
line_end = defaultNullOpts.mkStr "─" '' | ||
Symbol used to draw the end of a line. | ||
''; | ||
|
||
title_left = defaultNullOpts.mkStr "─" '' | ||
Symbol used to draw the left border of the title. | ||
''; | ||
|
||
title_right = defaultNullOpts.mkStr "─" '' | ||
Symbol used to draw the right border of the title. | ||
''; | ||
|
||
outer_blank_lines_above = defaultNullOpts.mkBool false '' | ||
Insert a blank line above the box. | ||
''; | ||
|
||
outer_blank_lines_below = defaultNullOpts.mkBool false '' | ||
Insert a blank line below the box. | ||
''; | ||
|
||
inner_blank_lines = defaultNullOpts.mkBool false '' | ||
Insert a blank line above and below the text. | ||
''; | ||
|
||
line_blank_line_above = defaultNullOpts.mkBool false '' | ||
Insert a blank line above the line. | ||
''; | ||
|
||
line_blank_line_below = defaultNullOpts.mkBool false '' | ||
Insert a blank line below the line. | ||
''; | ||
}; | ||
}; | ||
|
||
settingsExample = { | ||
comment_style = "block"; | ||
doc_width = 100; | ||
box_width = 120; | ||
borders = { | ||
top_left = "X"; | ||
top_right = "X"; | ||
bottom_left = "X"; | ||
bottom_right = "X"; | ||
}; | ||
line_width = 40; | ||
lines = { | ||
line = "*"; | ||
}; | ||
outer_blank_lines_below = true; | ||
inner_blank_lines = 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,40 @@ | ||
_: { | ||
empty = { | ||
plugins.comment-box.enable = true; | ||
}; | ||
|
||
defaults = { | ||
plugins.comment-box = { | ||
enable = true; | ||
|
||
settings = { | ||
comment_style = "line"; | ||
doc_width = 80; | ||
box_width = 60; | ||
borders = { | ||
top = "─"; | ||
bottom = "─"; | ||
left = "│"; | ||
right = "│"; | ||
top_left = "╭"; | ||
top_right = "╮"; | ||
bottom_left = "╰"; | ||
bottom_right = "╯"; | ||
}; | ||
line_width = 70; | ||
lines = { | ||
line = "─"; | ||
line_start = "─"; | ||
line_end = "─"; | ||
title_left = "─"; | ||
title_right = "─"; | ||
}; | ||
outer_blank_lines_above = false; | ||
outer_blank_lines_below = false; | ||
inner_blank_lines = false; | ||
line_blank_line_above = false; | ||
line_blank_line_below = false; | ||
}; | ||
}; | ||
}; | ||
} |