[mod] surface client
This commit is contained in:
parent
5f094cdd95
commit
5c859d014f
9 changed files with 37 additions and 19 deletions
|
|
@ -51,3 +51,21 @@ return (
|
|||
)
|
||||
};
|
||||
|
||||
(:~ close a file :)
|
||||
declare function docs:close($socket as xs:string,$uri as xs:string)
|
||||
as map(*){
|
||||
let $files:=ws:get($socket,"files",{})
|
||||
return if(map:contains($files,$uri))
|
||||
then let $props:=$files($uri)
|
||||
return (
|
||||
map:items($props)!ws:delete($socket,.),
|
||||
ws:set($socket,"files",map:remove($files,$uri))
|
||||
)
|
||||
else ()
|
||||
};
|
||||
(:~ list a file :)
|
||||
declare function docs:list($socket as xs:string)
|
||||
as xs:string*{
|
||||
ws:get($socket,"files",{})=>map:keys()
|
||||
|
||||
};
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
"selectionRangeProvider": true,
|
||||
"documentLinkProvider": {},
|
||||
"serverInfo": {
|
||||
"name": "BaseX Language Server",
|
||||
"name": "XQuery 4.0 Language Server",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ as empty-sequence()
|
|||
return ()
|
||||
};
|
||||
|
||||
(:~ didOpen method response :)
|
||||
(:~ didChange method response :)
|
||||
declare
|
||||
function lsp-text:didChange($json as map(*))
|
||||
as map(*)?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue