local M = {} function M.setup() local whichkey = require "which-key" local conf = { window = { border = "single", -- none, single, double, shadow position = "bottom", -- bottom, top }, } local opts = { mode = {"n", "v"}, -- Normal mode prefix = " ", buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings silent = true, -- use `silent` when creating keymaps noremap = true, -- use `noremap` when creating keymaps nowait = true, -- use `nowait` when creating keymaps } local mappings = { --["w"] = { "update!", "Save" }, ["f"] = { "Neotree", "fs"}, ["t"] = { "UndotreeToggle", "clip tree"}, ["e"] = { "TroubleToggle", "errors" }, ["g"] = { name = "'games'", ["q"] = { "KillKillKill", "killer sheep" }, ["w"] = { "Nvimesweeper", "minesweeper" }, ["e"] = { "CellularAutomaton make_it_rain", "c_a make it rain" }, ["r"] = { "CellularAutomaton game_of_life", "c_a conway gol" }, ["t"] = { "Tetris", "tetris" }, ["y"] = { "ShenzhenSolitaireNewGame", "solitaire" }, ["u"] = { "BlackJackNewGame", "blackjack" }, ["i"] = { "lua require('sudoku').setup{}Sudoku", "sudoku" }, }, ["n"] = { name = "sci", ["i"] = { "lua require('nabla').toggle_virt({autogen=true})", "toggle" }, }, ["q"] = { name = "quick chords", ["l"] = { "0v$", "line" }, ["s"] = { "\"+y", "system grab" }, }, ["z"] = { name = "packer", c = { "PackerCompile", "compile" }, i = { "PackerInstall", "install" }, s = { "PackerSync", "sync" }, S = { "PackerStatus", "status" }, u = { "PackerUpdate", "update" }, }, } whichkey.setup(conf) whichkey.register(mappings, opts) end return M