From 5fd11168cdfc8bd19194e0fc3b3a56a46b6d6a51 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Thu, 2 May 2024 13:25:23 +0200 Subject: [PATCH] added minifiles keymap, resolved keymap conflict --- lua/kickstart/plugins/conform.lua | 4 ++-- lua/kickstart/plugins/mini.lua | 3 +++ lua/kickstart/plugins/which-key.lua | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/kickstart/plugins/conform.lua b/lua/kickstart/plugins/conform.lua index 97149ee..5f1780b 100644 --- a/lua/kickstart/plugins/conform.lua +++ b/lua/kickstart/plugins/conform.lua @@ -4,12 +4,12 @@ return { lazy = false, keys = { { - 'f', + 'fb', function() require('conform').format { async = true, lsp_fallback = true } end, mode = '', - desc = '[F]ormat buffer', + desc = '[F]ormat [B]uffer', }, }, opts = { diff --git a/lua/kickstart/plugins/mini.lua b/lua/kickstart/plugins/mini.lua index ceee6a5..d77ffc9 100644 --- a/lua/kickstart/plugins/mini.lua +++ b/lua/kickstart/plugins/mini.lua @@ -19,6 +19,9 @@ return { -- Simple file explorer with in-buffer-editing require('mini.files').setup() + vim.keymap.set({ 'n', 'v' }, 'fe', function() + MiniFiles.open() + end, { desc = '[F]ile [E]xplorer' }) -- Simple and easy statusline. -- You could remove this setup call if you don't like it, diff --git a/lua/kickstart/plugins/which-key.lua b/lua/kickstart/plugins/which-key.lua index 3583571..317a1a2 100644 --- a/lua/kickstart/plugins/which-key.lua +++ b/lua/kickstart/plugins/which-key.lua @@ -34,6 +34,7 @@ return { ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, ['dn'] = { name = '[N]o', _ = 'which_key_ignore' }, ['l'] = { name = '[L]ist', _ = 'which_key_ignore' }, + ['f'] = { name = '[F]ormat/[F]ile', _ = 'which_key_ignore' }, } -- register which-key VISUAL mode @@ -47,6 +48,7 @@ return { ['dn'] = { name = '[N]o', _ = 'which_key_ignore' }, ['pn'] = { name = '[N]o', _ = 'which_key_ignore' }, ['l'] = { name = '[L]ist', _ = 'which_key_ignore' }, + ['f'] = { name = '[F]ormat/[F]ile', _ = 'which_key_ignore' }, }, { mode = 'v' }) end, },