From 6fc3986e36d201c11ab99e166220372529e85e0b Mon Sep 17 00:00:00 2001 From: 4o1x5 <4o1x5@4o1x5.dev> Date: Thu, 16 Jan 2025 20:22:18 +0100 Subject: [PATCH] rust: nuked my custom formatter --- config/keymaps.nix | 13 ++++++++++++- config/plugins/lang/rust.nix | 8 +------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/config/keymaps.nix b/config/keymaps.nix index af02426..6caf954 100644 --- a/config/keymaps.nix +++ b/config/keymaps.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ keymaps = [ { # Focus file tree @@ -10,6 +11,16 @@ key = "e"; action = "CHADopen"; } + { + # format current document + mode = "n"; + key = "bf"; + action = "lua require('conform').format()"; + options = { + silent = true; + desc = "Format Buffer"; + }; + } ]; } diff --git a/config/plugins/lang/rust.nix b/config/plugins/lang/rust.nix index ca72de4..b1943c9 100644 --- a/config/plugins/lang/rust.nix +++ b/config/plugins/lang/rust.nix @@ -11,13 +11,7 @@ conform-nvim.settings = { formatters_by_ft = { - rust = [ "cargo" ]; - }; - - formatters = { - cargo = { - command = "cargo-fmt"; - }; + rust = [ "rustfmt" ]; }; };