conjure

:neovim:+:clj: https://github.com/Olical/conjure - If you're enjoying Conjure and want to say thanks: https://github.com/users/Olical/sponsorship :smile: (alt https://conjure.fun/discord)
2021-05-11T08:00:18.097700Z

I too use this approach and it works well.

harryvederci 2021-05-11T10:09:21.101700Z

The only thing I didn't get to work is which-key , got a bunch of errors there. Do you use that as well @matthew.newland? For now I just copy pasted and modified @olical his dotfiles his noremap function:

(module dotfiles.mapping
  {autoload {nvim aniseed.nvim
             nu aniseed.nvim.util
             core aniseed.core}})

(local my-mapped-keys [])

(defn show-my-mapped-keys []
  (each [_ mapped-key (pairs my-mapped-keys)]
    (print (. mapped-key "from")
           "   "
           (. mapped-key "description"))))

(defn- noremap [mode from to description]
  "Sets a mapping with {:noremap true}, and adds it to the my-mapped-keys value."
  (table.insert my-mapped-keys 
                {:mode mode 
                 :from from 
                 :to to 
                 :description description})
  (nvim.set_keymap mode from to {:noremap true}))

(noremap :n :<leader>wh ":let &winheight = 999<CR>" "Set window height to 999")
(noremap :n :<leader><leader> ":call ShowMyMappedKeys()<cr>" "Show my mapped keys.")

(nu.fn-bridge
  :ShowMyMappedKeys
  :dotfiles.mapping :show-my-mapped-keys)
So hitting <leader><leader> will show me my keybindings. I'm kinda tempted to create a key-witch fennel plugin now, to keep up with the sorcery theme 😛

Olical 2021-05-11T12:01:37.102200Z

I haven't really used which-key in practice, but I've tried https://github.com/folke/which-key.nvim very briefly for my conjure/aniseed starter kit and it worked really well out of the box!

2021-05-11T12:53:04.102500Z

👍