Compare commits

...

3 commits

14 changed files with 73 additions and 85 deletions

3
.oxfmtrc.json Normal file
View file

@ -0,0 +1,3 @@
{
"ignorePatterns": ["_sources/*.json", "secrets/*.yaml"]
}

View file

@ -7,6 +7,38 @@
"arguments": ["-"] "arguments": ["-"]
} }
} }
},
"JSON": {
"formatter": {
"external": {
"command": "oxfmt",
"arguments": ["--stdin-filepath", "{buffer_path}"]
}
}
},
"Markdown": {
"formatter": {
"external": {
"command": "oxfmt",
"arguments": ["--stdin-filepath", "{buffer_path}"]
}
}
},
"YAML": {
"formatter": {
"external": {
"command": "oxfmt",
"arguments": ["--stdin-filepath", "{buffer_path}"]
}
}
},
"TOML": {
"formatter": {
"external": {
"command": "oxfmt",
"arguments": ["--stdin-filepath", "{buffer_path}"]
}
}
} }
} }
} }

View file

@ -33,6 +33,7 @@
just just
nvfetcher nvfetcher
alejandra alejandra
oxfmt
lua-language-server lua-language-server
]; ];

View file

@ -18,7 +18,7 @@
settings = { settings = {
font-family = [ font-family = [
"MonoLisa" "MonoLisa"
"Source Han Sans" "Source Han Sans SC"
]; ];
font-size = lib.mkForce 17; font-size = lib.mkForce 17;
theme = "Atom One Dark"; theme = "Atom One Dark";

View file

@ -118,9 +118,7 @@
"drawerEnabled": true, "drawerEnabled": true,
"hidePassive": false, "hidePassive": false,
"id": "Tray", "id": "Tray",
"pinned": [ "pinned": ["Fcitx"]
"Fcitx"
]
}, },
{ {
"clockColor": "none", "clockColor": "none",
@ -457,12 +455,7 @@
"autoHideMs": 2000, "autoHideMs": 2000,
"overlayLayer": true, "overlayLayer": true,
"backgroundOpacity": 1, "backgroundOpacity": 1,
"enabledTypes": [ "enabledTypes": [0, 1, 2, 3],
0,
1,
2,
3
],
"monitors": [] "monitors": []
}, },
"audio": { "audio": {

View file

@ -159,7 +159,7 @@ in {
settings = cfg.settings; settings = cfg.settings;
style = '' style = ''
* { * {
font-family: Libertinus Serif, Source Han Serif; font-family: Libertinus Serif, Source Han Serif SC;
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 16px;
} }

View file

@ -31,7 +31,6 @@ in {
"hurl" "hurl"
"idris2" "idris2"
"java" "java"
"java-eclipse-jdtls"
"kdl" "kdl"
"kotlin" "kotlin"
"lua" "lua"
@ -111,9 +110,9 @@ in {
buffer_font_size = 20; buffer_font_size = 20;
buffer_font_family = "MonoLisa"; buffer_font_family = "MonoLisa";
buffer_font_fallback = [ buffer_font_fallback = [
"Source Han Sans" "Source Han Sans SC"
]; ];
ui_font_family = "Source Han Sans"; ui_font_family = "Source Han Sans SC";
theme = "Catppuccin Latte"; theme = "Catppuccin Latte";
helix_mode = true; helix_mode = true;
}; };

View file

@ -39,6 +39,18 @@ in {
fish_greeting = { fish_greeting = {
body = ''''; body = '''';
}; };
nani = {
body =
# fish
''
for command in $argv
echo "$command:"
for path in $(which --all "$command" 2>/dev/null)
realpath $path
end
end
'';
};
}; };
shellInitLast = shellInitLast =
# fish # fish

View file

@ -20,7 +20,7 @@
}; };
sansSerif = { sansSerif = {
package = pkgs.source-han-sans; package = pkgs.source-han-sans;
name = "Source Han Sans"; name = "Source Han Sans SC";
}; };
monospace = { monospace = {
package = pkgs.maple-mono.NF-CN; package = pkgs.maple-mono.NF-CN;

View file

@ -20,7 +20,7 @@
}; };
sansSerif = { sansSerif = {
package = pkgs.source-han-sans; package = pkgs.source-han-sans;
name = "Source Han Sans"; name = "Source Han Sans SC";
}; };
monospace = { monospace = {
package = pkgs.maple-mono.NF-CN; package = pkgs.maple-mono.NF-CN;

View file

@ -71,11 +71,11 @@ in {
defaultFonts = { defaultFonts = {
serif = [ serif = [
"Libertinus Serif" "Libertinus Serif"
"Source Han Serif" "Source Han Serif SC"
"Noto Serif CJK SC" "Noto Serif CJK SC"
]; ];
sansSerif = [ sansSerif = [
"Source Han Sans" "Source Han Sans SC"
"Noto Sans CJK SC" "Noto Sans CJK SC"
]; ];
monospace = [ monospace = [

View file

@ -3,7 +3,7 @@
#lua #lua
'' ''
if vim.g.neovide then if vim.g.neovide then
vim.o.guifont = [[MonoLisa,Source Han Sans,Noto Color Emoji:h16]] vim.o.guifont = [[MonoLisa,Source Han Sans SC,Noto Color Emoji:h16]]
vim.g.neovide_opacity = 0.9 vim.g.neovide_opacity = 0.9
vim.g.linespace = 0.2 vim.g.linespace = 0.2
vim.g.neovide_text_gamma = 0.8 vim.g.neovide_text_gamma = 0.8

View file

@ -29,36 +29,12 @@ patch:
- { when: has_menu, accept: minus, send: Page_Up } - { when: has_menu, accept: minus, send: Page_Up }
- { when: has_menu, accept: equal, send: Page_Down } - { when: has_menu, accept: equal, send: Page_Down }
- { - { when: always, toggle: ascii_punct, accept: Control+Shift+3 } # 切换中英标点
when: always, - { when: always, toggle: ascii_punct, accept: Control+Shift+numbersign } # 切换中英标点
toggle: ascii_punct, - { when: always, toggle: traditionalization, accept: Control+Shift+4 } # 切换简繁
accept: Control+Shift+3, - { when: always, toggle: traditionalization, accept: Control+Shift+dollar } # 切换简繁
} # 切换中英标点 - { when: always, toggle: full_shape, accept: Control+Shift+5 } # 切换全半角
- { - { when: always, toggle: full_shape, accept: Control+Shift+percent } # 切换全半角
when: always,
toggle: ascii_punct,
accept: Control+Shift+numbersign,
} # 切换中英标点
- {
when: always,
toggle: traditionalization,
accept: Control+Shift+4,
} # 切换简繁
- {
when: always,
toggle: traditionalization,
accept: Control+Shift+dollar,
} # 切换简繁
- {
when: always,
toggle: full_shape,
accept: Control+Shift+5,
} # 切换全半角
- {
when: always,
toggle: full_shape,
accept: Control+Shift+percent,
} # 切换全半角
# 将小键盘 0~9 . 映射到主键盘,数字金额大写的 Lua 如 R1234.5678 可使用小键盘输入 # 将小键盘 0~9 . 映射到主键盘,数字金额大写的 Lua 如 R1234.5678 可使用小键盘输入
- { accept: KP_0, send: 0, when: composing } - { accept: KP_0, send: 0, when: composing }

View file

@ -1,43 +1,18 @@
{ {
perSystem = { perSystem = {lib, ...}: {
pkgs,
lib,
...
}: {
treefmt = { treefmt = {
programs = { programs = {
alejandra = { alejandra = {
enable = true; enable = true;
excludes = ["_sources/*.nix"]; excludes = ["_sources/*.nix"];
}; };
biome = { oxfmt = let
oxfmtConfig = with lib;
pipe ./.oxfmtrc.json [builtins.readFile builtins.fromJSON];
in {
enable = true; enable = true;
includes = ["*.json"]; includes = ["*.json" "*.md" "*.toml" "*.yaml"];
excludes = ["_sources/*.json"]; excludes = oxfmtConfig.ignorePatterns;
settings = {
formatter.indentStyle = "space";
javascript.formatter.enabled = false;
css.formatter.enabled = false;
};
};
dprint = {
enable = true;
includes = [
"*.md"
"*.toml"
"*.yaml"
];
excludes = ["secrets/*.yaml"];
settings = {
plugins = pkgs.dprint-plugins.getPluginList (
plugins:
with plugins; [
dprint-plugin-toml
dprint-plugin-markdown
g-plane-pretty_yaml
]
);
};
}; };
just = { just = {
enable = true; enable = true;
@ -45,10 +20,7 @@
}; };
typos = let typos = let
config = with lib; config = with lib;
pipe ./.typos.toml [ pipe ./.typos.toml [builtins.readFile fromTOML];
builtins.readFile
fromTOML
];
in { in {
enable = true; enable = true;
includes = ["*"]; includes = ["*"];