vscode

Quiet in here? Check #calva-dev out :smiley:
2019-12-24T02:16:49.016200Z

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 🙂

pez 2019-12-24T07:47:55.018600Z

You can scope it by putting it inside a "[clojure]" setting.

pez 2019-12-24T08:58:35.019600Z

You’ll find Calva’s user default wordSeparators pattern scoped like that here: https://github.com/BetterThanTomorrow/calva/blob/master/package.json#L90

2019-12-24T15:56:49.022800Z

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:

pez 2019-12-24T16:31:36.026600Z

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.

2019-12-24T18:23:03.026900Z

that does seem more flexible