Fork me on GitHub
#calva
<
2022-10-14
>
Marcelo Fernandes23:10:28

I prefer to use auto completion by typing the initial letter of each word. When calling my-very-long-variable I like to type mvlv. This works with the REPL connected and the def/defn is evaluated. However, if I can have some wishful thinking, I would like for the kebab case to be listed first on the popup instead of whatever ordering it's using. In this small example the first two results would be send-off and small-one. I am clueless on how to achieve this, any thoughts?

Marcelo Fernandes00:10:10

I have been using "editor.suggestSelection":"recentlyUsedByPrefix", which helps a bit

bringe15:10:48

I think these suggestions come from cider-nrepl, and probably the ordering comes from that by default too (without having looked at the Calva code). I’m not sure most people would prefer the ordering you describe, but there’s probably a way to do it in Calva after the completions are received from cider-nrepl. @U0ETXRFEW What are your thoughts?

pez15:10:46

I don't see OP as a suggestion to change the default orderin? More of a way to make it behave differently, right @U031447U0F9? In any case, I don't think the default should change, and I don't know how to make it behave in a kebab-way. ... What I do is that I type s-o in this case.

bringe15:10:07

Oh, I may have misunderstood. 👍

pez15:10:58

OTH, you had the manners to reply. 😃 ❤️

😄 2
Marcelo Fernandes16:10:38

The idea would be to change the order to show kebab matches first, this would be optional using a configuration. It's hard to get a feel if that would also works well. Because whenever I type so for some, some?, sort, etc. the behavior today works very well. With said configuration these results would appear further down and could be annoying in a lot of cases. I guess I'll just get used to typing s-o for small kebab words and live with that.

pez16:10:16

I think VS Code will be hard to convince to select in that way. And even so, I hesitate to make it configurable in Calva. Settings add maintenance and also cognitive load for the users.