Suggestion: Add "/" and "." to the default word limiters
/is used for ns import symbol reference ->(foo-long-name-space/fooer :bar)
- If I want to rename, swap out or correct the spelling of
fooerabove, but keep the source ns the same (foo-long-name-space) - and my cursor is right before the
:barkeyword, - then a
- ctrl+left (win)
- or opt+left (mac)
- would not take the cursor to after the
/, - but rather, in this case, to the opening of the form.
.is used for path segment delimiting ->clojure.spec.alpha
- Similar situation as above. The whole path there is considered one word.
- TBH I could imagine this one being even more subjective the the previous one
Hmmm, this is a tricky one! There is definitely value in being able to operate by word. At the same time the commands you mention have sexpr/form semantics, not words.
Maybe what could work is to introduce some Paredit commands that operate on words and give the user the option to choose word or sexpr semantics for the category of commands where this makes sense.
Is there prior art we can look at? What does Emacs clojure-mode do?
Oh that's my fault - I should have disambiguated above.
When I wrote "ctrl+left" or "opt+left", I did not mean "Calva Paredit: Navigate by form", just the default OS/vsc navigate by word. Personally I had the paredit equivalent remapped elsewhere.
I just mean, for those commands that do operate on word boundaries (mostly default vsc ones), that some of those boundaries include . and /
Ah, I see. I think the constraint there is that VS Code uses words for triggering hover/lookup/etcetera logic, so we need the full symbols. (Not completely sure about this, there are two concepts in VS Code for it and I often mix them up.)
I don't think these two are the same, for the purposes I speak of (non-structural cursor navigation and edits) - I've changed mine locally and they do not affect Go To Definition or hover working as before.
I see. Would you say this issue is covered by the note here? https://calva.io/customizing/#clojure-defaults