diff --git a/pkg/arvo/app/language-server.hoon b/pkg/arvo/app/language-server.hoon index 88b249157f..a93e57c7fc 100644 --- a/pkg/arvo/app/language-server.hoon +++ b/pkg/arvo/app/language-server.hoon @@ -5,7 +5,7 @@ easy-print=language-server-easy-print, rune-snippet=language-server-rune-snippet, build=language-server-build, - default-agent + default-agent, verb |% +$ card card:agent:gall +$ lsp-req @@ -44,6 +44,7 @@ == -- ^- agent:gall +%+ verb | =| state-zero =* state - =< @@ -69,7 +70,7 @@ |= old-state=vase ^- (quip card _this) ~& > %lsp-upgrade - [~ this(state *state-zero)] + [~ this(state !<(state-zero old-state))] :: ++ on-poke ^+ on-poke:*agent:gall @@ -275,12 +276,14 @@ ++ handle-did-open |= item=text-document-item:lsp-sur ^- (quip card _state) + =/ =path + (uri-to-path:build uri.item) + ?: ?=(%sys -.path) + `state =/ buf=wall (to-wall (trip text.item)) =. bufs (~(put by bufs) uri.item buf) - =/ =path - (uri-to-path:build uri.item) :_ state %+ weld (give-rpc-notification (get-diagnostics uri.item)) @@ -318,12 +321,12 @@ ?~ p.tab-list ~ ?~ u.p.tab-list ~ :- ~ - %- crip - ;: weld - "`" - ~(ram re ~(duck easy-print detail.i.u.p.tab-list)) - "`" - == + =- (crip :(weld "```hoon\0a" tape "\0a```")) + ^- =tape + %- zing + %+ join "\0a" + %+ scag 40 + (~(win re ~(duck easy-print detail.i.u.p.tab-list)) 0 140) :: ++ sync-buf |= [buf=wall changes=(list change:lsp-sur)] diff --git a/pkg/arvo/gen/tally.hoon b/pkg/arvo/gen/tally.hoon index 75e3a53cc0..fbaf04e0a9 100644 --- a/pkg/arvo/gen/tally.hoon +++ b/pkg/arvo/gen/tally.hoon @@ -61,14 +61,24 @@ ::NOTE we only count graphs for now ?. &(=(%graph app-name.m) =(our creator.metadatum)) ~ `[module.metadatum resource.m] +:: for sanity checks +:: +=/ real=(set resource:re) + =/ upd=update:ga + %+ scry update:ga + [%x %graph-store /keys/graph-update] + ?> ?=(%keys -.q.upd) + resources.q.upd :: count activity per channel :: =/ activity=(list [resource:re members=@ud (list [resource:re mod=term week=@ud authors=@ud])]) %+ turn crowds |= [g=resource:re m=@ud] :+ g m - %+ turn (~(got by channels) g) + %+ murn (~(got by channels) g) |= [m=term r=resource:re] + ?. (~(has in real) r) ~ + %- some :+ r m ::NOTE graph-store doesn't use the full resource-style path here! =/ upd=update:ga diff --git a/pkg/arvo/lib/language-server/complete.hoon b/pkg/arvo/lib/language-server/complete.hoon index 6e352e8196..e2beefcc0f 100644 --- a/pkg/arvo/lib/language-server/complete.hoon +++ b/pkg/arvo/lib/language-server/complete.hoon @@ -185,6 +185,7 @@ [%zpmc *] (both p.gen q.gen) [%zpts *] loop(gen p.gen) [%zppt *] (both q.gen r.gen) + [%zpgl *] (spec-and-hoon p.gen q.gen) [%zpzp *] ~ * =+ doz=~(open ap gen) @@ -245,15 +246,25 @@ ^- (unit [term type]) ~ :: +++ get-id-sym + |= [pos=@ud =tape] + %^ get-id pos tape + ^- $-(nail (like (unit @t))) + ;~(sfix (punt sym) (star ;~(pose prn (just `@`10)))) +:: +++ get-id-cord + |= [pos=@ud =tape] + %^ get-id pos tape + ^- $-(nail (like (unit @t))) + ;~(sfix (punt (cook crip (star prn))) (star ;~(pose prn (just `@`10)))) +:: ++ get-id - |= [pos=@ud txt=tape] + |= [pos=@ud txt=tape seek=$-(nail (like (unit @t)))] ^- [forward=(unit @t) backward=(unit @t) id=(unit @t)] - =/ seek - ;~(sfix (punt (cook crip (star prn))) (star ;~(pose prn (just `@`10)))) =/ forward=(unit @t) (scan (slag pos txt) seek) =/ backward=(unit @t) - %- (lift |=(t=@tas (swp 3 t))) + %- (lift |=(t=@t (swp 3 t))) (scan (flop (scag pos txt)) seek) =/ id=(unit @t) ?~ forward @@ -272,7 +283,7 @@ ^- [back-pos=@ud fore-pos=@ud txt=tape] :: Find beg-pos by searching backward to where the current term :: begins - =+ (get-id pos txt) + =+ (get-id-sym pos txt) =/ back-pos ?~ backward pos diff --git a/pkg/arvo/lib/shoe.hoon b/pkg/arvo/lib/shoe.hoon index d3769ad00f..0348e10e52 100644 --- a/pkg/arvo/lib/shoe.hoon +++ b/pkg/arvo/lib/shoe.hoon @@ -291,7 +291,7 @@ ++ tab |= pos=@ud ^- (quip card _cli-state) - =+ (get-id:auto pos (tufa buf.cli-state)) + =+ (get-id-cord:auto pos (tufa buf.cli-state)) =/ needle=term (fall id %$) :: autocomplete empty command iff user at start of command diff --git a/pkg/arvo/mar/png.hoon b/pkg/arvo/mar/png.hoon index e68e502cd1..6a60a6a27b 100644 --- a/pkg/arvo/mar/png.hoon +++ b/pkg/arvo/mar/png.hoon @@ -1,4 +1,4 @@ -|_ dat=@t +|_ dat=@ ++ grow |% ++ mime [/image/png (as-octs:mimes:html dat)] @@ -6,7 +6,7 @@ ++ grab |% ++ mime |=([p=mite q=octs] q.q) - ++ noun @t + ++ noun @ -- ++ grad %mime --