Fork me on GitHub
#calva
<
2020-02-25
>
hoppy11:02:14

more than likely my "imbalance" is in the top 5%, just sayn' (or so the voices tell me)

otwieracz22:02:15

Is there any ongoing progress on adding outline support to calva?

otwieracz22:02:30

It's pretty hard to navigate through code without it..

pez22:02:01

I wouldn't say it's ongoing. But it is on the radar at least.

otwieracz22:02:58

How complicated is that? I feel like this should be just bunch of regexes.

otwieracz22:02:25

Have you had a chance to have a look on (IIRC) outline providers?

sogaiu22:02:40

if you mean the outline view on the left side, i don't think it's hard.

sogaiu22:02:50

i adapted code from: https://github.com/hitode909/vscode-perl-outline to make a small sample that uses tree-sitter

markaddleman22:02:02

fyi - don't forget that it should also handle def-like macros

sogaiu23:02:00

perhaps there is some good logic to determine that sort of thing spelled out somewhere? what i have currently boils down to a hack:

(if (and (= (.-type first-elt) "symbol")
                        ;; XXX: other def things?
                        (#{"def"
                           "definterface" "defmacro"
                           "defmethod" "defmulti"
                           "defn" "defn-"
                           "defonce" "defprotocol"
                           "defrecord" "deftype"}
                          (.-text first-elt)))