(desktop) Gen 494: disabled auto linebreak by default in nixvim, made it only activate in plain text files like .md or .txt where linebreak formatting actually matters

This commit is contained in:
pagedMov
2024-10-16 00:49:25 -04:00
parent bd1add14bb
commit 1c2d41ac49
3 changed files with 20 additions and 10 deletions

14
flake.lock generated
View File

@@ -825,11 +825,11 @@
},
"nur": {
"locked": {
"lastModified": 1729035911,
"narHash": "sha256-MD81qtqfNYzbKssBk6hmozn3sB/qR+LL1Tx8qQE6+9U=",
"lastModified": 1729051801,
"narHash": "sha256-zh6TN4svngtanJVz2Gsf/ReDNMgOqdDKBOQCcEvvRaw=",
"owner": "nix-community",
"repo": "NUR",
"rev": "64079c912fb1734bf1f06ba4754ae8a1b6fa6e25",
"rev": "b578d2f4c64c59936403472f503d594a31a91163",
"type": "github"
},
"original": {
@@ -870,7 +870,7 @@
},
"locked": {
"lastModified": 1,
"narHash": "sha256-+aYqfRtAoaA4wqPfy4j2biNTVj2TtEmmHXDKOzNoU6g=",
"narHash": "sha256-Cp+apszVyMt3AIJSc7YFfxO2KhPvVQ63s3f8Uzkrfs8=",
"path": "./pkgs/nixvim",
"type": "path"
},
@@ -952,11 +952,11 @@
]
},
"locked": {
"lastModified": 1728965841,
"narHash": "sha256-IwFh7KUJ9saIONcklEkXR3ANtGxkZsNdtpeT6eyF01Q=",
"lastModified": 1729052237,
"narHash": "sha256-9eBLOj83C4WHF1WSZn6NvRo7eat8acYK1G9ajfESYNY=",
"owner": "gerg-l",
"repo": "spicetify-nix",
"rev": "3dfd050f21568902449939f085e8d1aa28fb9913",
"rev": "a83d478b4512fdb80e2dd5a86c5d67e73e0c8b7e",
"type": "github"
},
"original": {

View File

@@ -4,21 +4,31 @@
command = "FloatermNew --wintype=float --name=shadeterm --position=topright --autoclose=0 --silent --cwd=<buffer> --titleposition=left zsh";
event = ["VimEnter"];
pattern = ["*"];
desc = "Create a floating terminal, placed in the top right";
}
{
command = "silent! mkview";
event = ["BufWinLeave"];
pattern = ["*"];
desc = "Save session window settings to be loaded next time the file is opened";
}
{
command = "silent! !aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &";
event = ["BufWinLeave"];
pattern = ["*"];
desc = "Play a neat little sound effect when you close neovim";
}
{
command = "silent! loadview";
event = ["BufWinEnter"];
pattern = ["*"];
desc = "Load previous session window settings for the opened file (folds, cursor pos, etc)";
}
{
command = "setlocal textwidth = 135";
event = ["BufWinEnter" "BufEnter"];
pattern = ["*.md" "*.wiki" "*.txt"];
desc = "Set automatic linebreaks in plain text file formats";
}
];
}

View File

@@ -24,8 +24,8 @@
vim.opt.relativenumber = true
vim.opt.hlsearch = true
vim.opt.incsearch = true
vim.opt.shiftwidth = 4
vim.opt.tabstop = 4
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.termguicolors = true
vim.opt.ruler = true
vim.opt.scrolloff = 6
@@ -33,7 +33,7 @@
vim.opt.foldmethod = "manual"
vim.opt.wrap = true
vim.opt.linebreak = true
vim.opt.textwidth = 135
vim.opt.textwidth = 0
vim.opt.breakat = " \t!@*-+;:,./?"
vim.g.mapleader = "!"