From cdc75090ff9cb572a659b46b7e0ac9f850e78fb2 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 12 Nov 2024 18:21:15 +0000 Subject: [PATCH] Add keymaps and settings for nixvim plugins - Add Conform auto-format document keymap in conform.nix - Enable and configure Oil plugin settings in oil.nix - Update Telescope keymaps definition in telescope.nix --- home/common/core/nixvim/plugins/conform.nix | 12 ++++++++++++ home/common/core/nixvim/plugins/oil.nix | 4 ++++ home/common/core/nixvim/plugins/telescope.nix | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/home/common/core/nixvim/plugins/conform.nix b/home/common/core/nixvim/plugins/conform.nix index a2bcc28..5c1bd48 100644 --- a/home/common/core/nixvim/plugins/conform.nix +++ b/home/common/core/nixvim/plugins/conform.nix @@ -38,4 +38,16 @@ } ''; + programs.nixvim.keymaps = [ + # format document with Conform + { + mode = ["n"]; + key = "cf"; + action = "Format"; + options = { + silent = true; + desc = "Conform auto-format document"; + }; + } + ]; } diff --git a/home/common/core/nixvim/plugins/oil.nix b/home/common/core/nixvim/plugins/oil.nix index e10b7d1..07176b8 100644 --- a/home/common/core/nixvim/plugins/oil.nix +++ b/home/common/core/nixvim/plugins/oil.nix @@ -1,5 +1,9 @@ { programs.nixvim.plugins.oil = { enable = true; + settings = { + columns = ["icon"]; + view_options.show_hidden = true; + }; }; } diff --git a/home/common/core/nixvim/plugins/telescope.nix b/home/common/core/nixvim/plugins/telescope.nix index e309362..477e3ad 100644 --- a/home/common/core/nixvim/plugins/telescope.nix +++ b/home/common/core/nixvim/plugins/telescope.nix @@ -3,7 +3,7 @@ enable = true; extensions.fzy-native.enable = true; }; - keymaps = [ + programs.nixvim.keymaps = [ { # find files mode = ["n"];