This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-03
Channels
- # announcements (5)
- # babashka (7)
- # beginners (119)
- # biff (4)
- # cider (7)
- # clj-kondo (26)
- # cljfx (3)
- # cljs-dev (2)
- # clojure (28)
- # clojure-austin (18)
- # clojure-europe (9)
- # clojure-france (6)
- # clojure-norway (4)
- # clojure-uk (3)
- # clojurescript (6)
- # community-development (1)
- # core-async (4)
- # cursive (9)
- # data-science (12)
- # datomic (13)
- # duct (18)
- # emacs (15)
- # etaoin (5)
- # events (13)
- # honeysql (46)
- # hyperfiddle (9)
- # jackdaw (5)
- # jobs (13)
- # keechma (4)
- # lsp (37)
- # malli (32)
- # nbb (14)
- # off-topic (10)
- # other-languages (2)
- # polylith (4)
- # programming-beginners (3)
- # reagent (27)
- # reitit (1)
- # shadow-cljs (32)
- # sql (11)
- # tools-build (5)
- # tools-deps (3)
- # vim (14)
- # xtdb (11)
What should I do when I install vim-sexp
together with conjure
? When I install both then ,l
waits for half a second until it works (vim-sexp insert at the end of the form).
If I uninstall conjure
then it doesn't map any of the ,ll
and ,lr
keys and then vim-sexp
,l
works immediately.
Their mappings can't be changed and to change them I basically have to do a fork. Is it that nobody tried to use them together?
I use https://github.com/tpope/vim-sexp-mappings-for-regular-people it sets more comfortable vim mappings. For example the ,l
in vim-sexp
becomes >I
But in that plugin tpope says that These mappings supplement rather than replace the existing mappings
So uh... not good 😕 Does this plugin define ,l
? I'll try it
I also found that in vim-sexp
source code the author uses a variable to bind all bindings. So if I could sneak in my own variable instead of that one then I could bind all I want.
The other way to fix it if you don't want to use those would be to remap conjures mappings if sexp can't be remapped. Remapping is documented in :h conjure but it involves setting g: globals. If you remap every conjure mapping prefixed with l so there's no more conflicts you won't get the delay anymore.
vim-sexp
uses localleader kind of liberally so it's not only l
mapping that would need to be changed.
I found that they repeatedly use this: get(g:sexp_mappings, plug, s:sexp_mappings[plug])
but I don't yet know how to use it. I'll look into sources of tpope plugin because if I can instead override mappings using g:sexp_mappings
then tpope's plugin isn't something useful.
Edit: After trying tpope's plugin it looks like that he depends on vim-sexp
and it also enables the <localleader>l
mapping. So this is a problem because this is what I wanted to avoid.
i.e. tpope's plugin only adds more mappings but not removes the ones that I want to remove.
This is the fix for this one mapping (move vim-sexp
,l
to something else):
let g:sexp_mappings = {
\ 'sexp_round_head_wrap_list': '<LocalLeader>yourkeys',
\ }
I really like that I can do this. Nice.
All mappings: https://github.com/guns/vim-sexp/blob/master/plugin/sexp.vim#L67if you don’t want to remap, you can update timeoutlen
: https://neovim.io/doc/user/options.html#'timeoutlen'
it waits for a second by default to see if there are any other keys coming before taking action
so depending on how fast you trigger things, you could set that to 200 (ms) or 50 (and match ttimeoutlen
)
Does anyone know how to highlight only a part of a keyword?
In CIDER I have the first version but nvim gives me the second one. How can I highlight part of a keyword?
They also highlight the /
separator in white which is neat but I want to at least highlight the namespace first.
I also created this issue but considering the other open issues they may never close it: https://github.com/clojure-vim/clojure.vim/issues/24
It's the basic one. I didn't set up anything else.
Do you see this highlighting separately?