mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-20 13:22:07 +03:00
arvo: language-server desk support
This commit is contained in:
parent
fdd29804d6
commit
dc03d866f8
@ -5,7 +5,7 @@
|
|||||||
easy-print=language-server-easy-print,
|
easy-print=language-server-easy-print,
|
||||||
rune-snippet=language-server-rune-snippet,
|
rune-snippet=language-server-rune-snippet,
|
||||||
build=language-server-build,
|
build=language-server-build,
|
||||||
default-agent, verb
|
default-agent, verb, dbug
|
||||||
|%
|
|%
|
||||||
+$ card card:agent:gall
|
+$ card card:agent:gall
|
||||||
+$ lsp-req
|
+$ lsp-req
|
||||||
@ -44,6 +44,7 @@
|
|||||||
==
|
==
|
||||||
--
|
--
|
||||||
^- agent:gall
|
^- agent:gall
|
||||||
|
%- agent:dbug
|
||||||
%+ verb |
|
%+ verb |
|
||||||
=| state-zero
|
=| state-zero
|
||||||
=* state -
|
=* state -
|
||||||
@ -196,7 +197,7 @@
|
|||||||
%+ turn
|
%+ turn
|
||||||
~(tap in ~(key by builds))
|
~(tap in ~(key by builds))
|
||||||
|= uri=@t
|
|= uri=@t
|
||||||
[%pass /ford/[uri] %arvo %c %warp our.bow %home ~]
|
[%pass /ford/[uri] %arvo %c %warp our.bow %base ~]
|
||||||
::
|
::
|
||||||
++ handle-did-close
|
++ handle-did-close
|
||||||
|= [uri=@t version=(unit @)]
|
|= [uri=@t version=(unit @)]
|
||||||
@ -208,7 +209,7 @@
|
|||||||
=. builds
|
=. builds
|
||||||
(~(del by builds) uri)
|
(~(del by builds) uri)
|
||||||
:_ state
|
:_ state
|
||||||
[%pass /ford/[uri] %arvo %c %warp our.bow %home ~]~
|
[%pass /ford/[uri] %arvo %c %warp our.bow %base ~]~
|
||||||
::
|
::
|
||||||
++ handle-did-save
|
++ handle-did-save
|
||||||
|= [uri=@t version=(unit @)]
|
|= [uri=@t version=(unit @)]
|
||||||
@ -217,7 +218,7 @@
|
|||||||
:_ (give-rpc-notification (get-diagnostics uri))
|
:_ (give-rpc-notification (get-diagnostics uri))
|
||||||
:*
|
:*
|
||||||
%pass
|
%pass
|
||||||
/commit
|
/commit˘
|
||||||
%agent
|
%agent
|
||||||
[our.bow %hood]
|
[our.bow %hood]
|
||||||
%poke
|
%poke
|
||||||
@ -240,18 +241,29 @@
|
|||||||
?> ?=([%writ *] gift)
|
?> ?=([%writ *] gift)
|
||||||
=/ uri=@t
|
=/ uri=@t
|
||||||
(snag 1 path)
|
(snag 1 path)
|
||||||
=; res=(quip card _state)
|
=/ loc=^path (uri-to-path:build uri)
|
||||||
[(snoc -.res (build-file | uri path)) +.res]
|
=; [res=(quip card _state) dek=desk]
|
||||||
|
[(snoc -.res (build-file | uri loc `dek)) +.res]
|
||||||
?~ p.gift
|
?~ p.gift
|
||||||
[~ state]
|
[[~ state] %base]
|
||||||
=. builds
|
=. builds
|
||||||
(~(put by builds) uri q.r.u.p.gift)
|
(~(put by builds) uri q.r.u.p.gift)
|
||||||
=. ford-diagnostics
|
=. ford-diagnostics
|
||||||
(~(del by ford-diagnostics) uri)
|
(~(del by ford-diagnostics) uri)
|
||||||
=+ .^(=open:clay %cs /(scot %p our.bow)/home/(scot %da now.bow)/open/foo)
|
=/ bek byk.bow
|
||||||
=/ =type -:(open (uri-to-path:build uri))
|
=/ desks=(list desk) ~(tap in .^((set desk) %cd (en-beam bek /)))
|
||||||
|
=| dek=desk
|
||||||
|
|-
|
||||||
|
?~ desks [[~ state] %base]
|
||||||
|
=. dek ?: =(%kids i.desks) %base i.desks
|
||||||
|
=/ exists=? .^(? %cu (en-beam bek(q dek) loc))
|
||||||
|
?. exists $(desks t.desks)
|
||||||
|
=+ .^(=open:clay %cs /(scot %p our.bow)/[dek]/(scot %da now.bow)/open/foo)
|
||||||
|
=/ =type -:(open loc)
|
||||||
|
|
||||||
=. preludes
|
=. preludes
|
||||||
(~(put by preludes) uri type)
|
(~(put by preludes) uri type)
|
||||||
|
:_ dek
|
||||||
:_ state
|
:_ state
|
||||||
(give-rpc-notification (get-diagnostics uri))
|
(give-rpc-notification (get-diagnostics uri))
|
||||||
::
|
::
|
||||||
@ -265,19 +277,28 @@
|
|||||||
(get-parser-diagnostics uri)
|
(get-parser-diagnostics uri)
|
||||||
::
|
::
|
||||||
++ build-file
|
++ build-file
|
||||||
|= [eager=? uri=@t =path]
|
|= [eager=? uri=@t =path desk=(unit desk)]
|
||||||
^- card
|
^- card
|
||||||
=/ =rave:clay
|
=/ =rave:clay
|
||||||
?: eager
|
?: eager
|
||||||
[%sing %a da+now.bow path]
|
[%sing %a da+now.bow path]
|
||||||
[%next %a da+now.bow path]
|
[%next %a da+now.bow path]
|
||||||
[%pass /ford/[uri] %arvo %c %warp our.bow %home `rave]
|
=/ des=^desk ?^ desk u.desk %base
|
||||||
|
[%pass /ford/[uri] %arvo %c %warp our.bow des `rave]
|
||||||
::
|
::
|
||||||
++ handle-did-open
|
++ handle-did-open
|
||||||
|= item=text-document-item:lsp-sur
|
|= item=text-document-item:lsp-sur
|
||||||
^- (quip card _state)
|
^- (quip card _state)
|
||||||
=/ =path
|
=/ =path
|
||||||
(uri-to-path:build uri.item)
|
(uri-to-path:build uri.item)
|
||||||
|
=/ bek byk.bow
|
||||||
|
=/ desks=(list desk) ~(tap in .^((set desk) %cd (en-beam bek /)))
|
||||||
|
=| dek=desk
|
||||||
|
|-
|
||||||
|
?~ desks [~ state]
|
||||||
|
=. dek ?: =(%kids i.desks) %base i.desks
|
||||||
|
=/ exists=? .^(? %cu (en-beam bek(q dek) path))
|
||||||
|
?. exists $(desks t.desks)
|
||||||
?: ?=(%sys -.path)
|
?: ?=(%sys -.path)
|
||||||
`state
|
`state
|
||||||
=/ buf=wall
|
=/ buf=wall
|
||||||
@ -287,7 +308,7 @@
|
|||||||
:_ state
|
:_ state
|
||||||
%+ weld
|
%+ weld
|
||||||
(give-rpc-notification (get-diagnostics uri.item))
|
(give-rpc-notification (get-diagnostics uri.item))
|
||||||
[(build-file & uri.item path) ~]
|
[(build-file & uri.item path `dek) ~]
|
||||||
::
|
::
|
||||||
++ get-parser-diagnostics
|
++ get-parser-diagnostics
|
||||||
|= uri=@t
|
|= uri=@t
|
||||||
|
Loading…
Reference in New Issue
Block a user