refactor(keys): improve keymap configurations and remove unused floaterm plugin

This commit is contained in:
sankalp committed 2025-09-28 21:28:19 +05:45
1 parent 1c14292c8f
commit 4c5fa067e2
6 files changed
+137 -178

No files matched your search

+44 -53
View File
@@ -1,55 +1,46 @@
return {
{
"echasnovski/mini.files",
version = "*",
event = { "BufReadPost", "BufNewFile" },
config = function()
require("mini.files").setup({
content = {
filter = nil,
prefix = nil,
sort = nil,
},
mappings = {
close = "q",
go_in = "L",
go_in_plus = "l",
go_out = "h",
go_out_plus = "H",
mark_goto = "'",
mark_set = "m",
reset = "<BS>",
reveal_cwd = "@",
show_help = "g?",
synchronize = "<CR>",
trim_left = "<",
trim_right = ">",
},
options = {
permanent_delete = true,
use_as_default_explorer = true,
},
windows = {
max_number = math.huge,
preview = false,
width_focus = 30,
width_nofocus = 20,
width_preview = 80,
},
})
end,
},
{
"prichrd/netrw.nvim",
config = function()
require("netrw").setup({
icons = {
symlink = "",
directory = "",
file = "",
},
use_devicons = true,
})
end,
},
{
'echasnovski/mini.files',
version = '*',
event = { 'BufReadPost', 'BufNewFile' },
config = function()
require('mini.files').setup({
content = {
filter = nil,
prefix = nil,
sort = nil,
},
mappings = {
close = 'q',
go_in = 'L',
go_in_plus = 'l',
go_out = 'h',
go_out_plus = 'H',
mark_goto = "'",
mark_set = 'm',
reset = '<BS>',
reveal_cwd = '@',
show_help = 'g?',
synchronize = '<CR>',
trim_left = '<',
trim_right = '>',
},
options = {
permanent_delete = true,
use_as_default_explorer = true,
},
windows = {
max_number = math.huge,
preview = false,
width_focus = 30,
width_nofocus = 20,
width_preview = 80,
},
})
end,
},
{
'prichrd/netrw.nvim',
opts = {},
},
}
+12 -26
View File
@@ -81,12 +81,12 @@ return {
insert_mappings = true,
terminal_mappings = true,
persist_size = true,
direction = 'float', -- Use 'float' for floating terminal windows
direction = 'float', -- 'vertical' | 'horizontal' | 'tab' | 'float'
close_on_exit = true,
shell = vim.o.shell,
float_opts = {
border = 'curved', -- or 'single', 'double', 'shadow', etc.
winblend = 0, -- Set to 0 for full transparency
border = 'curved', -- 'single', 'double', 'shadow', etc.
winblend = 0, -- Set to 0 for full transparency
highlights = {
border = 'Normal',
background = 'Normal',
@@ -95,20 +95,6 @@ return {
})
end,
},
{
'nvzone/floaterm',
dependencies = 'nvzone/volt',
opts = {
mappings = {
term = function(buf)
vim.keymap.set({ 'n', 't' }, '<Tab>', function()
require('floaterm.api').cycle_term_bufs('prev')
end, { buffer = buf })
end,
},
},
cmd = 'FloatermToggle',
},
-- smooth scrolling
{
@@ -131,16 +117,16 @@ return {
picker_integration = true,
keymaps = {
prefix = '<leader>u', -- Main prefix for uv commands
commands = true, -- Show uv commands menu (<leader>x)
run_file = true, -- Run current file (<leader>xr)
commands = true, -- Show uv commands menu (<leader>x)
run_file = true, -- Run current file (<leader>xr)
run_selection = true, -- Run selected code (<leader>xs)
run_function = true, -- Run function (<leader>xf)
venv = true, -- Environment management (<leader>xe)
init = true, -- Initialize uv project (<leader>xi)
add = true, -- Add a package (<leader>xa)
remove = true, -- Remove a package (<leader>xd)
sync = true, -- Sync packages (<leader>xc)
sync_all = true, -- Sync all packages, extras and groups (<leader>xC)
run_function = true, -- Run function (<leader>xf)
venv = true, -- Environment management (<leader>xe)
init = true, -- Initialize uv project (<leader>xi)
add = true, -- Add a package (<leader>xa)
remove = true, -- Remove a package (<leader>xd)
sync = true, -- Sync packages (<leader>xc)
sync_all = true, -- Sync all packages, extras and groups (<leader>xC)
},
},
},
+1 -15
View File
@@ -101,23 +101,9 @@ return {
{ '<leader>gu', ':Gitsigns undo_stage_hunk<cr>', desc = 'Undo Stage Hunk' },
{ '<leader>gv', ':Gitsigns select_hunk<cr>', desc = 'Select Hunk' },
{ '<leader>gw', ':lua require("snacks").gitbrowse()<cr>', desc = 'Git Browse' },
{ '<leader>gbr', ':lua Snacks.picker.git_branches()<cr>', desc = 'Pick and Switch Git Branches' },
{ '<leader>gp', ':lua Snacks.picker.git_branches()<cr>', desc = 'Pick and Switch Git Branches' },
{ '<leader>h', group = 'Harpoon' },
-- {
-- '<leader>ha',
-- function()
-- require('harpoon'):list():add()
-- end,
-- desc = 'Harpoon add file',
-- },
-- {
-- '<leader>hl',
-- function()
-- require('harpoon').ui:toggle_quick_menu(require('harpoon'):list())
-- end,
-- desc = 'Harpoon quick menu',
-- },
{ '<leader>gt', group = 'Toggle' },
{ '<leader>gtb', ':Gitsigns toggle_current_line_blame<cr>', desc = 'Blame' },