my system configurations ^-^
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(helix): dprint markdown formatting

willow 0ea7f362 10be6c53

+24 -3
+9 -3
modules/shared/home/programs/tui/helix/default.nix
··· 3 3 lib, 4 4 pkgs, 5 5 inputs, 6 + config, 6 7 ... 7 8 }: let 8 9 cfg = osConfig.settings.programs; ··· 18 19 19 20 config = lib.mkIf (cfg.tui.enable 20 21 && cfg.categories.dev.enable) { 22 + xdg.configFile.".dprint.jsonc".text = builtins.toJSON (import ./dprint-conf.nix {inherit pkgs;}); 23 + 21 24 programs.helix = { 22 25 enable = true; 23 26 defaultEditor = true; ··· 27 30 command = lib.getExe pkgs.prettierd; 28 31 args = ["--stdin-filepath" "%{buffer_name}"]; 29 32 }; 33 + dprint = { 34 + command = lib.getExe pkgs.dprint; 35 + args = ["fmt" "--config" "${config.xdg.configHome}/.dprint.jsonc" "--stdin" "%{buffer_name}"]; 36 + }; 30 37 in { 31 38 language-server = { 32 39 emmet-lsp = { ··· 57 64 command = lib.getExe pkgs-unstable.openscad-lsp; 58 65 args = ["--stdio"]; 59 66 }; 60 - 61 67 markdown-oxide.command = lib.getExe pkgs.markdown-oxide; 62 68 }; 63 69 language = [ ··· 76 82 { 77 83 name = "markdown"; 78 84 language-servers = ["markdown-oxide"]; 79 - soft-wrap.enable = true; 80 - formatter.command = lib.getExe pkgs.mdformat; 85 + formatter = dprint; 86 + auto-format = true; 81 87 } 82 88 { 83 89 name = "typescript";
+15
modules/shared/home/programs/tui/helix/dprint-conf.nix
··· 1 + {pkgs, ...}: { 2 + # lineWidth = 120; 3 + # json = { 4 + # indentWidth = 2; 5 + # }; 6 + plugins = with pkgs; 7 + dprint-plugins.getPluginList ( 8 + plugins: 9 + with dprint-plugins; [ 10 + dprint-plugin-toml 11 + dprint-plugin-markdown 12 + dprint-plugin-json 13 + ] 14 + ); 15 + }