neovim: fix buffer configs

This commit is contained in:
Dmitriy Pleshevskiy 2024-05-20 23:49:50 +03:00
parent 9510653d50
commit 366f7e2e6e
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -4,11 +4,11 @@ let
inherit (lib.mod) ctrl;
inherit (lib.nix2lua) pipe1 require call call0;
mkLineLimiterGroup = { limit, filetypes }:
mkLineLimiterGroup = { limit, pattern }:
lib.nameValuePair
"line-limiter-${toString limit}"
{
inherit filetypes;
inherit pattern;
opt = {
colorcolumn = toString limit;
textwidth = limit;
@ -26,12 +26,12 @@ in
formatexpr = "neoformat#Neoformat(0, '', v:lnum, v:lnum + v:count)";
};
buffer = {
buffer.filetype = {
nix.opt.formatexpr = "neoformat#Neoformat(0, '', 0, 99999)";
} // lib.listToAttrs [
(mkLineLimiterGroup {
limit = 101;
filetypes = [
pattern = [
"nix"
"javascript,javascriptreact"
"typescript,typescriptreact"
@ -41,7 +41,7 @@ in
})
(mkLineLimiterGroup {
limit = 81;
filetypes = [
pattern = [
"python"
"json"
"yaml"