From aaab1ea5bde64f23bf04b270ec7c2d8a333e3e57 Mon Sep 17 00:00:00 2001 From: 4o1x5 <4o1x5@4o1x5.dev> Date: Thu, 16 Jan 2025 19:46:23 +0100 Subject: [PATCH] rust: added formatter cus I was tryna use the cargo-fmt as a linter, oops --- config/plugins/default.nix | 4 ++-- config/plugins/lang/rust.nix | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config/plugins/default.nix b/config/plugins/default.nix index d891cae..ec05b7d 100644 --- a/config/plugins/default.nix +++ b/config/plugins/default.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ imports = [ ./ai @@ -12,5 +13,4 @@ # Persistence plugins.persistence.enable = true; - } diff --git a/config/plugins/lang/rust.nix b/config/plugins/lang/rust.nix index ce5eda8..ca72de4 100644 --- a/config/plugins/lang/rust.nix +++ b/config/plugins/lang/rust.nix @@ -9,16 +9,17 @@ settings.completion.callable.snippets = "add_parentheses"; }; - lint = { - lintersByFt = { + conform-nvim.settings = { + formatters_by_ft = { rust = [ "cargo" ]; }; - linters = { + formatters = { cargo = { - cmd = "${pkgs.rustfmt}/bin/cargo-fmt"; + command = "cargo-fmt"; }; }; }; + }; }