This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-11
Channels
- # aleph (3)
- # announcements (3)
- # aws (7)
- # babashka (121)
- # beginners (82)
- # calva (40)
- # chlorine-clover (37)
- # clj-kondo (68)
- # cljsrn (4)
- # clojure (43)
- # clojure-australia (1)
- # clojure-dev (6)
- # clojure-europe (15)
- # clojure-italy (2)
- # clojure-nl (1)
- # clojure-provo (3)
- # clojure-spec (23)
- # clojure-taiwan (1)
- # clojure-uk (21)
- # clojurescript (214)
- # code-reviews (1)
- # conjure (4)
- # core-async (10)
- # cursive (52)
- # datahike (5)
- # datascript (5)
- # datomic (62)
- # duct (1)
- # emacs (4)
- # fulcro (8)
- # graalvm (1)
- # helix (1)
- # honeysql (5)
- # integrant (1)
- # jackdaw (32)
- # jobs (3)
- # jobs-discuss (16)
- # juxt (1)
- # kaocha (3)
- # lsp (6)
- # malli (2)
- # meander (6)
- # nrepl (1)
- # off-topic (46)
- # other-languages (4)
- # pathom (7)
- # polylith (13)
- # re-frame (3)
- # releases (2)
- # shadow-cljs (56)
- # spacemacs (15)
- # tools-deps (3)
- # unrepl (1)
- # utah-clojurians (1)
I too use this approach and it works well.
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 😛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!