i tried adding the following to a workspace-specific settings.json, so in .vscode/settings.json (based on wordPattern from calva):
{
"editor.wordSeparators": ",#()[]{};\"\\@'`~"
}
this helps in selecting more appropriately upon double-clicking. (not so great for mixed-language projects, but possibly a worthwhile trade-off in many cases)
(pressing f12 after the double-clicking now essentially results in "Go to Definition" assuming a successful lookup)
no success yet in figuring out how to get this sort of thing to apply only to clojure files, but it's an improvement over the previous situation.
thanks again @pez 🙂You can scope it by putting it inside a "[clojure]"
setting.
You’ll find Calva’s user default wordSeparators
pattern scoped like that here: https://github.com/BetterThanTomorrow/calva/blob/master/package.json#L90
using the scoping tip seems to work well.
i also tried the wordSeparators
pattern and that appears to be an improvement over my quick hack :)
i noticed that the pattern includes a colon. if i double-click on a keyword the whole thing is not selected. is that intentional?
in any case, thanks a lot for your help, @pez :thumbsup:
I don't remember the rationale for the colon. 😀 But in Calva there is a command for selecting the current form, which will include the colon if used on a keyword, so it makes sense that double-click can skip it.
that does seem more flexible