From ee2a2eb429acbd914489bab0fb606ff712e86a2c Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sat, 16 Mar 2024 18:17:16 +0100 Subject: [PATCH] Add formating keybinding. --- home-manager/modules/nvim.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/home-manager/modules/nvim.nix b/home-manager/modules/nvim.nix index 89e9848..afb5c8c 100644 --- a/home-manager/modules/nvim.nix +++ b/home-manager/modules/nvim.nix @@ -7,11 +7,18 @@ viAlias = true; vimAlias = true; - keymaps = [{ - action = "Oil"; - key = "e"; - options = { silent = true; }; - }]; + keymaps = [ + { + action = "Oil"; + key = "e"; + options = { silent = true; }; + } + { + action = "lua require('conform').format({ bufnr = buf })"; + key = "f"; + options = { silent = true; }; + } + ]; options = { hlsearch = false;