feat: Update nvchad configuration

This commit is contained in:
ulic-youthlic 2025-10-22 00:59:37 +08:00
parent 9c6ad33e41
commit fe9f9d614a
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
3 changed files with 110 additions and 111 deletions

26
flake.lock generated
View file

@ -925,11 +925,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1760950171, "lastModified": 1761623016,
"narHash": "sha256-E2ySTu/oK7cYBdAI3tlGP9zVjF4mZgWJ1OZInBCMb00=", "narHash": "sha256-C2+TErNmeHMCtodwVrMeA/uJg1GRdQbOntRI7DFullA=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "f851a923137c0a54719412146fd63d24b3214e60", "rev": "f0bfe0aaaa51378ace7492850290f8d2db6cc7f3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -958,11 +958,11 @@
"niri-unstable": { "niri-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1760940149, "lastModified": 1761460429,
"narHash": "sha256-KbM47vD6E0cx+v4jYQZ8mD5N186AKm2CQlyh34TW58U=", "narHash": "sha256-pJeM23DGMD5AK4gdNaDM1qsIv87NYQJgEh2E8tRd7es=",
"owner": "YaLTeR", "owner": "YaLTeR",
"repo": "niri", "repo": "niri",
"rev": "b3245b81a6ed8edfaf5388a74d2e0a23c24941e5", "rev": "e6f3c538da0c646bda43fcde7ef7dc3b771e0c8b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1156,11 +1156,11 @@
}, },
"nixpkgs-stable_3": { "nixpkgs-stable_3": {
"locked": { "locked": {
"lastModified": 1760862643, "lastModified": 1761468971,
"narHash": "sha256-PXwG0TM7Ek87DNx4LbGWuD93PbFeKAJs4FfALtp7Wo0=", "narHash": "sha256-vY2OLVg5ZTobdroQKQQSipSIkHlxOTrIF1fsMzPh8w8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "33c6dca0c0cb31d6addcd34e90a63ad61826b28c", "rev": "78e34d1667d32d8a0ffc3eba4591ff256e80576e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1390,7 +1390,7 @@
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-F3ysDLjeyNGHcZYOQHbw8kjBqf3L+ESrZs9XMRefOJQ=", "narHash": "sha256-5i6dXIjMmBZZ4WusMd/kCPijOVQR9AkosndKF07QVIo=",
"path": "./nvchad", "path": "./nvchad",
"type": "path" "type": "path"
}, },
@ -1836,11 +1836,11 @@
"xwayland-satellite-unstable": { "xwayland-satellite-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1759707084, "lastModified": 1761622056,
"narHash": "sha256-0pkftKs6/LReNvxw7DVTN2AJEheZVgyeK0Aarbagi70=", "narHash": "sha256-fBrUszJXmB4MY+wf3QsCnqWHcz7u7fLq0QMAWCltIQg=",
"owner": "Supreeeme", "owner": "Supreeeme",
"repo": "xwayland-satellite", "repo": "xwayland-satellite",
"rev": "a9188e70bd748118b4d56a529871b9de5adb9988", "rev": "0728d59ff6463a502e001fb090f6eb92dbc04756",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -18,6 +18,8 @@ in
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
editor-runtime editor-runtime
pkg-config
]; ];
neovim = pkgs.neovim-nightly; neovim = pkgs.neovim-nightly;
backup = true; backup = true;

View file

@ -1,102 +1,99 @@
require "nvchad.options"
local o = vim.o
local opt = vim.opt local opt = vim.opt
o.autoindent = true local options = {
o.autoread = true autoindent = true,
opt.backspace = { autoread = true,
backspace = {
"indent", "indent",
"eol", "eol",
"start", "start",
} },
o.backup = false backup = false,
breakindent = true,
opt.breakindent = true breakindentopt = { "sbr" },
opt.breakindentopt = { "sbr" } showbreak = "",
o.showbreak = "" cdhome = true,
cmdheight = 1,
o.cdhome = true completeopt = {
o.cmdheight = 1
opt.completeopt = {
"fuzzy", "fuzzy",
"menuone", "menuone",
"noselect", "noselect",
"popup", "popup",
} },
opt.concealcursor = { ["v"] = true } concealcursor = { ["v"] = true },
o.confirm = true confirm = true,
o.cursorline = true cursorline = true,
opt.cursorlineopt = { "number", "screenline" } cursorlineopt = { "number", "screenline" },
opt.diffopt = { diffopt = {
"algorithm:minimal", "algorithm:minimal",
"closeoff", "closeoff",
"context:20", "context:20",
"followwrap", "followwrap",
"internal", "internal",
"linematch:40", "linematch:40",
} },
o.errorbells = true errorbells = true,
o.expandtab = true expandtab = true,
o.exrc = true exrc = true,
o.foldcolumn = "auto" foldcolumn = "auto",
o.fsync = true fsync = true,
o.gdefault = false gdefault = false,
opt.helplang = { helplang = {
"zh", "zh",
"en", "en",
} },
o.history = 10000 history = 10000,
o.hlsearch = true hlsearch = true,
ignorecase = true,
o.ignorecase = true smartcase = true,
o.smartcase = true inccommand = "split",
list = true,
o.inccommand = "split" listchars = {
o.list = true
opt.listchars = {
tab = "--→", tab = "--→",
trail = "·", trail = "·",
multispace = " ", multispace = " ",
nbsp = "", nbsp = "",
space = "·", space = "·",
} },
o.magic = true magic = true,
o.more = true more = true,
o.mouse = "a" mouse = "a",
number = true,
o.number = true numberwidth = 4,
o.numberwidth = 4 relativenumber = true,
o.relativenumber = true scrollback = 100000,
scrolloff = 5,
o.scrollback = 100000 shiftround = true,
o.scrolloff = 5 shiftwidth = 2,
o.shiftround = true showmode = false,
o.shiftwidth = 2 signcolumn = "yes",
o.showmode = false smoothscroll = true,
o.signcolumn = "yes" splitbelow = true,
o.smoothscroll = true splitright = true,
o.splitbelow = true startofline = true,
o.splitright = true swapfile = false,
o.startofline = true tabclose = {
o.swapfile = false
opt.tabclose = {
"uselast", "uselast",
} },
o.tabstop = 2 tabstop = 2,
o.termguicolors = true termguicolors = true,
o.undofile = true undofile = true,
o.undolevels = 100000 undolevels = 100000,
opt.virtualedit = { virtualedit = {
"block", "block",
"onemore", "onemore",
} },
opt.whichwrap = { b = true, s = true, ["<"] = true, [">"] = true } whichwrap = { b = true, s = true, ["<"] = true, [">"] = true },
o.wildmenu = true wildmenu = true,
opt.wildmode = { "full" } wildmode = { "full" },
opt.wildoptions = { wildoptions = {
"fuzzy", "fuzzy",
"pum", "pum",
},
winborder = "solid",
wrap = true
} }
o.winborder = "solid"
o.wrap = true for key, value in pairs(options) do
opt[key] = value
end