This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-01
Channels
- # announcements (1)
- # babashka (1)
- # beginners (45)
- # business (3)
- # calva (43)
- # clojure (57)
- # clojure-spec (6)
- # clojure-uk (4)
- # clojured (8)
- # clojurescript (14)
- # cryogen (3)
- # datomic (2)
- # emacs (36)
- # fulcro (20)
- # garden (2)
- # jobs (2)
- # lumo (3)
- # meander (9)
- # off-topic (1)
- # other-lisps (1)
- # reagent (13)
- # shadow-cljs (25)
- # spacemacs (20)
- # tools-deps (11)
@pez in processing clj-ish files from github using tree-sitter or clj-kondo, here are a few things that come up that can lead to errors / warnings:
* template files - people do things like: (ns {{namespace}}.rendering
or :{{name}}
(mustache?) -- small number of instances of other styles too
* missing, misplaced, or incorrectly placed closing delimiters
* non-clojure text in (comment
or #_
blocks
* questionable(?) symbols and keywords - things that the repl might accept, but for which i didn't find a statement of support (e.g. # in keywords, keywords with multiple slashes in them)
Thanks! I've saved these observations. Working with setting up tests for Calva's paredit lexer right now.
in short, yes. i don't know if other file extensions are used for template files -- i'm only testing files named .clj
, .cljs
, and .cljc
.
in the samples collected, i have about 100,000 .clj files, 20,000 .cljs files, and 8,000 .cljc files.
Haha, awesome. Publishing it as a repo of it's own? I have just made some changes to my paredit lexer/cursor and it would be nice to have a sea of real world samples to throw the changes at.
i adapted andyfingerhut's recent investigation work to come up with the git repository urls to fetch and then fetched them: https://github.com/jafingerhut/haironfire
Here's a demo of the changes, btw. I want data readers to be toknized together with the forms they annotate. As my lexer is line based, I can't have it fully my way when the reader marker is on a line of its own. But for that I modified token cursor a bit so that at least it navigates correctly for the basic forward/backward sexpr cases.
Also in that gif is shown that if the tag is on the same line as what it tags. Paredit drag-up and push-down sexp works also in the presence of tagged list forms.
that sounds like it would be nice if it worked better, but i confess to not being a paredit or parinfer user, so it wouldn't affect my use 🙂
I'm such a Paredit junkie that I will eventally make a paredit extension that works for all programming languages I use. It's horrible not having it in html/js/css and such.
i do use some structural navigation features in some editors, but i find that i don't use most of the other features. i also find the keybindings chosen in various places to override some basic sequences that i have been using for other things so i end up not using it so often. perhaps if i could find a simple enough extension or write one myself i'd use this type of thing more.
in vscode i use ctrl-home and ctrl-end to go to the beginning and end of an editor respectively. this also works in some other places.
”Why are people nagging me about raise sexp?” ... implementing it anyway_ ... ”Oh, that's why!” ,,, can't live without it.
https://calva.readthedocs.io/en/latest/paredit.html suggests they are bound to something else -- or may be i misunderstand?
Yeah, you are right. It's a bit of a mistake, since I am a mac user and use cmd+home/end.
i appreciate this bit of advice though:
If you are new to Paredit, consider starting with learning the Slurp Forward (pull in the next form into this form) and Barf Forward (push the last form out of this form). It will take you quite far.
i end up having to do things on multiple platforms and some things are quite hard to shake -- on windows there is a fair bit of this type of stuff.
But you can rebind those. And I can consider making a keymap where I correct that mistake.
i find i can remember the names of commands or locations in menus better than key sequences.
Dear Calva-friends: A new Calva is out - v2.0.79. Main change is that reader tag thing mentioned above, and summarized here: https://github.com/BetterThanTomorrow/calva/issues/570 It is a rather foundational change, so please be alert and let me know if something that used to work seems broken. The release also brings a change in the tmLanguage grammar regarding highlighting of keywords. They are now actually highlighted by most vscode themes.