neovim: refac line limiter
This commit is contained in:
parent
9cda7b1c76
commit
b9fe063b50
1 changed files with 8 additions and 6 deletions
|
@ -4,15 +4,17 @@ let
|
|||
inherit (lib.mod) ctrl;
|
||||
inherit (lib.nix2lua) pipe1 require call call0 nf var;
|
||||
|
||||
mkLineLimiterOpts = limit: {
|
||||
colorcolumn = toString (limit + 1);
|
||||
textwidth = limit;
|
||||
};
|
||||
|
||||
mkLineLimiterGroup = { limit, pattern }:
|
||||
lib.nameValuePair
|
||||
"line-limiter-${toString limit}"
|
||||
{
|
||||
inherit pattern;
|
||||
opt = {
|
||||
colorcolumn = toString limit;
|
||||
textwidth = limit - 1;
|
||||
};
|
||||
opt = mkLineLimiterOpts limit;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -28,7 +30,7 @@ in
|
|||
|
||||
buffer.filetype = lib.listToAttrs [
|
||||
(mkLineLimiterGroup {
|
||||
limit = 101;
|
||||
limit = 100;
|
||||
pattern = [
|
||||
"nix"
|
||||
"javascript,javascriptreact"
|
||||
|
@ -38,7 +40,7 @@ in
|
|||
];
|
||||
})
|
||||
(mkLineLimiterGroup {
|
||||
limit = 81;
|
||||
limit = 80;
|
||||
pattern = [
|
||||
"python"
|
||||
"json"
|
||||
|
|
Loading…
Reference in a new issue