local lazy = require "lazy-load" local oil = lazy.setup "oil" local pick = lazy.setup "mini.pick" local map = vim.keymap.set local function mapn(lhs, rhs) map("n", lhs, rhs) end local function mapleader(lhs, rhs) mapn("" .. lhs, rhs) end local function wincmd(action) return function() vim.cmd.winc(action) end end mapn("", vim.cmd.noh) mapn("", "") mapn("", wincmd "h") mapn("", wincmd "j") mapn("", wincmd "k") mapn("", wincmd "l") mapleader("s", vim.cmd.source) mapleader("w", vim.cmd.write) mapleader("f", vim.lsp.buf.format) mapleader("q", vim.diagnostic.setloclist) mapleader("o", function() oil.open() end) mapleader("O", function() oil.toggle_float() end) mapleader("pf", function() pick.builtin.files() end) mapleader("pg", function() pick.builtin.grep_live() end) mapleader("ph", function() pick.builtin.help() end)