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": ["-"]
}
}
},
"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
nvfetcher
alejandra
oxfmt
lua-language-server
];

View file

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

View file

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

View file

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

View file

@ -31,7 +31,6 @@ in {
"hurl"
"idris2"
"java"
"java-eclipse-jdtls"
"kdl"
"kotlin"
"lua"
@ -111,9 +110,9 @@ in {
buffer_font_size = 20;
buffer_font_family = "MonoLisa";
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";
helix_mode = true;
};

View file

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

View file

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

View file

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

View file

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

View file

@ -3,7 +3,7 @@
#lua
''
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.linespace = 0.2
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: equal, send: Page_Down }
- {
when: always,
toggle: ascii_punct,
accept: Control+Shift+3,
} # 切换中英标点
- {
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,
} # 切换全半角
- { when: always, toggle: ascii_punct, accept: Control+Shift+3 } # 切换中英标点
- { 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 可使用小键盘输入
- { accept: KP_0, send: 0, when: composing }

View file

@ -1,43 +1,18 @@
{
perSystem = {
pkgs,
lib,
...
}: {
perSystem = {lib, ...}: {
treefmt = {
programs = {
alejandra = {
enable = true;
excludes = ["_sources/*.nix"];
};
biome = {
oxfmt = let
oxfmtConfig = with lib;
pipe ./.oxfmtrc.json [builtins.readFile builtins.fromJSON];
in {
enable = true;
includes = ["*.json"];
excludes = ["_sources/*.json"];
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
]
);
};
includes = ["*.json" "*.md" "*.toml" "*.yaml"];
excludes = oxfmtConfig.ignorePatterns;
};
just = {
enable = true;
@ -45,10 +20,7 @@
};
typos = let
config = with lib;
pipe ./.typos.toml [
builtins.readFile
fromTOML
];
pipe ./.typos.toml [builtins.readFile fromTOML];
in {
enable = true;
includes = ["*"];