diff --git a/.oxfmtrc.json b/.oxfmtrc.json deleted file mode 100644 index 6c6a80e..0000000 --- a/.oxfmtrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ignorePatterns": ["_sources/*.json", "secrets/*.yaml"] -} diff --git a/.zed/settings.json b/.zed/settings.json index 2f8a134..ff63d82 100644 --- a/.zed/settings.json +++ b/.zed/settings.json @@ -7,38 +7,6 @@ "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}"] - } - } } } } diff --git a/flake/perSystem.nix b/flake/perSystem.nix index 7d2c42a..c972461 100644 --- a/flake/perSystem.nix +++ b/flake/perSystem.nix @@ -33,7 +33,6 @@ just nvfetcher alejandra - oxfmt lua-language-server ]; diff --git a/home/david/modules/programs/ghostty.nix b/home/david/modules/programs/ghostty.nix index 663fc8d..482a37f 100644 --- a/home/david/modules/programs/ghostty.nix +++ b/home/david/modules/programs/ghostty.nix @@ -18,7 +18,7 @@ settings = { font-family = [ "MonoLisa" - "Source Han Sans SC" + "Source Han Sans" ]; font-size = lib.mkForce 17; theme = "Atom One Dark"; diff --git a/home/david/modules/programs/noctalia/settings.json b/home/david/modules/programs/noctalia/settings.json index d0db0e0..d6b6bd0 100644 --- a/home/david/modules/programs/noctalia/settings.json +++ b/home/david/modules/programs/noctalia/settings.json @@ -118,7 +118,9 @@ "drawerEnabled": true, "hidePassive": false, "id": "Tray", - "pinned": ["Fcitx"] + "pinned": [ + "Fcitx" + ] }, { "clockColor": "none", @@ -455,7 +457,12 @@ "autoHideMs": 2000, "overlayLayer": true, "backgroundOpacity": 1, - "enabledTypes": [0, 1, 2, 3], + "enabledTypes": [ + 0, + 1, + 2, + 3 + ], "monitors": [] }, "audio": { diff --git a/home/david/modules/programs/waybar.nix b/home/david/modules/programs/waybar.nix index 66ead8e..83301f2 100644 --- a/home/david/modules/programs/waybar.nix +++ b/home/david/modules/programs/waybar.nix @@ -159,7 +159,7 @@ in { settings = cfg.settings; style = '' * { - font-family: Libertinus Serif, Source Han Serif SC; + font-family: Libertinus Serif, Source Han Serif; font-weight: bold; font-size: 16px; } diff --git a/home/david/modules/programs/zed.nix b/home/david/modules/programs/zed.nix index ff565b6..e0088dd 100644 --- a/home/david/modules/programs/zed.nix +++ b/home/david/modules/programs/zed.nix @@ -31,6 +31,7 @@ in { "hurl" "idris2" "java" + "java-eclipse-jdtls" "kdl" "kotlin" "lua" @@ -110,9 +111,9 @@ in { buffer_font_size = 20; buffer_font_family = "MonoLisa"; buffer_font_fallback = [ - "Source Han Sans SC" + "Source Han Sans" ]; - ui_font_family = "Source Han Sans SC"; + ui_font_family = "Source Han Sans"; theme = "Catppuccin Latte"; helix_mode = true; }; diff --git a/home/modules/programs/fish.nix b/home/modules/programs/fish.nix index 10233f8..9a4a1db 100644 --- a/home/modules/programs/fish.nix +++ b/home/modules/programs/fish.nix @@ -39,18 +39,6 @@ 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 diff --git a/nixos/configurations/Akun/stylix.nix b/nixos/configurations/Akun/stylix.nix index 3a17b5e..e9c1218 100644 --- a/nixos/configurations/Akun/stylix.nix +++ b/nixos/configurations/Akun/stylix.nix @@ -20,7 +20,7 @@ }; sansSerif = { package = pkgs.source-han-sans; - name = "Source Han Sans SC"; + name = "Source Han Sans"; }; monospace = { package = pkgs.maple-mono.NF-CN; diff --git a/nixos/configurations/Tytonidae/stylix.nix b/nixos/configurations/Tytonidae/stylix.nix index 09abdcb..cf760a0 100644 --- a/nixos/configurations/Tytonidae/stylix.nix +++ b/nixos/configurations/Tytonidae/stylix.nix @@ -20,7 +20,7 @@ }; sansSerif = { package = pkgs.source-han-sans; - name = "Source Han Sans SC"; + name = "Source Han Sans"; }; monospace = { package = pkgs.maple-mono.NF-CN; diff --git a/nixos/modules/gui/default.nix b/nixos/modules/gui/default.nix index d9934f4..4a7247a 100644 --- a/nixos/modules/gui/default.nix +++ b/nixos/modules/gui/default.nix @@ -71,11 +71,11 @@ in { defaultFonts = { serif = [ "Libertinus Serif" - "Source Han Serif SC" + "Source Han Serif" "Noto Serif CJK SC" ]; sansSerif = [ - "Source Han Sans SC" + "Source Han Sans" "Noto Sans CJK SC" ]; monospace = [ diff --git a/pkgs/nixvim/neovide.nix b/pkgs/nixvim/neovide.nix index 0202c70..144670e 100644 --- a/pkgs/nixvim/neovide.nix +++ b/pkgs/nixvim/neovide.nix @@ -3,7 +3,7 @@ #lua '' if vim.g.neovide then - vim.o.guifont = [[MonoLisa,Source Han Sans SC,Noto Color Emoji:h16]] + vim.o.guifont = [[MonoLisa,Source Han Sans,Noto Color Emoji:h16]] vim.g.neovide_opacity = 0.9 vim.g.linespace = 0.2 vim.g.neovide_text_gamma = 0.8 diff --git a/pkgs/rime-all/default.custom.yaml b/pkgs/rime-all/default.custom.yaml index 4505e22..bad6da4 100644 --- a/pkgs/rime-all/default.custom.yaml +++ b/pkgs/rime-all/default.custom.yaml @@ -29,12 +29,36 @@ 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 } diff --git a/treefmt.nix b/treefmt.nix index 3e00dd3..3037b6b 100644 --- a/treefmt.nix +++ b/treefmt.nix @@ -1,18 +1,43 @@ { - perSystem = {lib, ...}: { + perSystem = { + pkgs, + lib, + ... + }: { treefmt = { programs = { alejandra = { enable = true; excludes = ["_sources/*.nix"]; }; - oxfmt = let - oxfmtConfig = with lib; - pipe ./.oxfmtrc.json [builtins.readFile builtins.fromJSON]; - in { + biome = { enable = true; - includes = ["*.json" "*.md" "*.toml" "*.yaml"]; - excludes = oxfmtConfig.ignorePatterns; + 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 + ] + ); + }; }; just = { enable = true; @@ -20,7 +45,10 @@ }; typos = let config = with lib; - pipe ./.typos.toml [builtins.readFile fromTOML]; + pipe ./.typos.toml [ + builtins.readFile + fromTOML + ]; in { enable = true; includes = ["*"];