diff --git a/modules/lang/csharp/config.el b/modules/lang/csharp/config.el index 2a6cf7aa6..94f64cc61 100644 --- a/modules/lang/csharp/config.el +++ b/modules/lang/csharp/config.el @@ -3,11 +3,7 @@ (use-package! csharp-mode :hook (csharp-mode . rainbow-delimiters-mode) :config - (when (and (file-exists-p (expand-file-name "~/.dotnet/tools/dotnet-csharpier")) - (file-exists-p ".config/dotnet-tools.json") - (eq 0 (call-process-shell-command - (format "grep -q 'dotnet-csharpier' %s" (expand-file-name ".config/dotnet-tools.json")) nil nil))) - (set-formatter! 'csharpier '("dotnet" "tool" "run" "dotnet-csharpier") :modes '(csharp-mode))) + (set-formatter! 'csharpier '("dotnet-csharpier") :modes '(csharp-mode)) (set-electric! 'csharp-mode :chars '(?\n ?\})) (set-rotate-patterns! 'csharp-mode :symbols '(("public" "protected" "private") diff --git a/modules/lang/csharp/doctor.el b/modules/lang/csharp/doctor.el index f816be957..3d7b2be35 100644 --- a/modules/lang/csharp/doctor.el +++ b/modules/lang/csharp/doctor.el @@ -11,8 +11,5 @@ "This module requires (:tools tree-sitter)") (when (modulep! :editor format) - (unless (and (file-exists-p (expand-file-name "~/.dotnet/tools/dotnet-csharpier")) - (file-exists-p ".config/dotnet-tools.json") - (eq 0 (call-process-shell-command - (format "grep -q 'dotnet-csharpier' %s" (expand-file-name ".config/dotnet-tools.json")) nil nil))) - (warn! "csharpier is not installed or setup as a local tool. Please see the module README. \nOtherwise, formatting will be disabled."))) + (unless (executable-find "dotnet-csharpier") + (warn! "csharpier is not installed, formatting will be disabled.")))