neovim: fix buffer configs
This commit is contained in:
parent
9510653d50
commit
366f7e2e6e
1 changed files with 5 additions and 5 deletions
|
@ -4,11 +4,11 @@ let
|
||||||
inherit (lib.mod) ctrl;
|
inherit (lib.mod) ctrl;
|
||||||
inherit (lib.nix2lua) pipe1 require call call0;
|
inherit (lib.nix2lua) pipe1 require call call0;
|
||||||
|
|
||||||
mkLineLimiterGroup = { limit, filetypes }:
|
mkLineLimiterGroup = { limit, pattern }:
|
||||||
lib.nameValuePair
|
lib.nameValuePair
|
||||||
"line-limiter-${toString limit}"
|
"line-limiter-${toString limit}"
|
||||||
{
|
{
|
||||||
inherit filetypes;
|
inherit pattern;
|
||||||
opt = {
|
opt = {
|
||||||
colorcolumn = toString limit;
|
colorcolumn = toString limit;
|
||||||
textwidth = limit;
|
textwidth = limit;
|
||||||
|
@ -26,12 +26,12 @@ in
|
||||||
formatexpr = "neoformat#Neoformat(0, '', v:lnum, v:lnum + v:count)";
|
formatexpr = "neoformat#Neoformat(0, '', v:lnum, v:lnum + v:count)";
|
||||||
};
|
};
|
||||||
|
|
||||||
buffer = {
|
buffer.filetype = {
|
||||||
nix.opt.formatexpr = "neoformat#Neoformat(0, '', 0, 99999)";
|
nix.opt.formatexpr = "neoformat#Neoformat(0, '', 0, 99999)";
|
||||||
} // lib.listToAttrs [
|
} // lib.listToAttrs [
|
||||||
(mkLineLimiterGroup {
|
(mkLineLimiterGroup {
|
||||||
limit = 101;
|
limit = 101;
|
||||||
filetypes = [
|
pattern = [
|
||||||
"nix"
|
"nix"
|
||||||
"javascript,javascriptreact"
|
"javascript,javascriptreact"
|
||||||
"typescript,typescriptreact"
|
"typescript,typescriptreact"
|
||||||
|
@ -41,7 +41,7 @@ in
|
||||||
})
|
})
|
||||||
(mkLineLimiterGroup {
|
(mkLineLimiterGroup {
|
||||||
limit = 81;
|
limit = 81;
|
||||||
filetypes = [
|
pattern = [
|
||||||
"python"
|
"python"
|
||||||
"json"
|
"json"
|
||||||
"yaml"
|
"yaml"
|
||||||
|
|
Loading…
Reference in a new issue