Merge commit '5a6a88c' into release/next-sys

This commit is contained in:
Philip Monk 2021-03-03 18:18:12 -08:00
commit 0e427c3c7e
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
5 changed files with 43 additions and 19 deletions

View File

@ -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)]

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
--