diff options
author | sterni <sternenseemann@systemli.org> | 2023-03-27T17·24+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-03-30T16·11+0000 |
commit | e292d82d839684dff5582caefa3a0f0a9f551af4 (patch) | |
tree | c5593a4a490cc18f6982b188b418f83f9ef6742f /users/sterni/emacs/default.nix | |
parent | e8fd2aabb3b900b20253df717b8a0533b7bfcb83 (diff) |
feat(sterni/emacs): disable warning 8 (dash len) in chktex flychecks r/6062
Change-Id: I394c48395cdc50bea3747f55d95f169e599018ac Reviewed-on: https://cl.tvl.fyi/c/depot/+/8370 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'users/sterni/emacs/default.nix')
-rw-r--r-- | users/sterni/emacs/default.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/users/sterni/emacs/default.nix b/users/sterni/emacs/default.nix index 9ff7da3812b6..cd682fa2eec3 100644 --- a/users/sterni/emacs/default.nix +++ b/users/sterni/emacs/default.nix @@ -3,6 +3,17 @@ let inherit (pkgs.stdenv.hostPlatform) is64bit; + # Wrap chktex(1) with the flags we want because the chktex flycheck checker + # ignores tex-chktex-extra-flags and has no other way to set flags. I did + # not want to mess around with chktexrc because that seems to involve copying + # around a lot of rules (that would need to be updated?). + # + # Warning 8 is about correct dash length. This is really annoying because it'll + # light up everywhere if you use typographically correct dashes in German text. + chktexLessWarnings = pkgs.writeShellScript "chktex-less-warnings" '' + exec chktex -n8 "$@" + ''; + # emacsPgtk is defined in emacs-overlay emacs = (pkgs.emacsPackagesFor pkgs.emacsPgtk).withPackages (epkgs: [ epkgs.bqn-mode @@ -69,6 +80,10 @@ let (setq shell-file-name "${pkgs.bash}/bin/bash" explicit-bash-args '("-l")) + ;; chktex wrapper that disables warnings I don't want + (setq flycheck-tex-chktex-executable "${chktexLessWarnings}") + (setq tex-chktex-program "${chktexLessWarnings}") + (provide 'nix-inject) ''; }) |