[mod] tidy
This commit is contained in:
parent
28b4799ee0
commit
eaebbd12aa
10 changed files with 19 additions and 89 deletions
|
|
@ -13,7 +13,7 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"hoverProvider": {},
|
||||
"hoverProvider": true,
|
||||
"documentSymbolProvider": false,
|
||||
"documentRangeFormattingProvider": false,
|
||||
"colorProvider": false,
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ declare
|
|||
function rpc:method-initialize($json as map(*))
|
||||
as map(*)
|
||||
{
|
||||
ws:set(ws:id(),"client", $json?params),
|
||||
rpc:result($json,
|
||||
json:doc("etc/capabilities.json",{"format":"w3"}))
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,9 +24,14 @@ declare
|
|||
function lsp-text:hover($json as map(*))
|
||||
as map(*)
|
||||
{
|
||||
let $pos:=$json?params?position
|
||||
let $uri:= $json?params?textDocument?uri
|
||||
let $word:="TODO"
|
||||
let $r:= [
|
||||
`At { pos:ln-col($json?params?position) }, uri: {$json?params?textDocument?uri},
|
||||
[path](https://quodatum.github.io/basex-xqparse/i-BaseX.xhtml#EQName)`
|
||||
`At { pos:ln-col($pos) }, uri: {$uri},
|
||||
[path](https://quodatum.github.io/basex-xqparse/i-BaseX.xhtml#EQName)
|
||||
|
||||
WordAt: {$word}`
|
||||
]
|
||||
return rpc:result($json,{"contents":$r})
|
||||
};
|
||||
|
|
@ -39,9 +44,11 @@ as map(*)?
|
|||
let $uri:=$json?params?textDocument?uri
|
||||
let $text:=docs:get(ws:id(), $uri, "textDocument")?text
|
||||
let $fr:=pos:full-range($text)
|
||||
(: dummy data :)
|
||||
let $nameRange:=$fr
|
||||
let $result:=map:for-each($lspt:SymbolKindMap,
|
||||
fn($k,$v){
|
||||
lspt:DocumentSymbol($k,$v,$fr,$fr,"todo")
|
||||
lspt:DocumentSymbol($k,$v,$fr,$nameRange,"todo description")
|
||||
})=>array:build()
|
||||
return rpc:result($json,$result)=>trace("SSS")
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function lsp-ws:message(
|
|||
$message as xs:string
|
||||
) as empty-sequence() {
|
||||
|
||||
let $json := rpc:parse($message=>trace("MSG "))
|
||||
let $json := rpc:parse($message)
|
||||
return if(exists($json))
|
||||
then rpc:reply($json)
|
||||
else message($message,"bad RPC: ")
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
[
|
||||
{
|
||||
"name": "symbol 1",
|
||||
"description": "This is the first item"
|
||||
},
|
||||
{
|
||||
"name": "symbol 2",
|
||||
"description": "This is the second item"
|
||||
},
|
||||
{
|
||||
"name": "symbol 3",
|
||||
"description": "This is the third item"
|
||||
},
|
||||
{
|
||||
"name": "symbol 4",
|
||||
"description": "This is the third item"
|
||||
},
|
||||
{
|
||||
"name": "symbol 5",
|
||||
"description": "This is the third item"
|
||||
},
|
||||
{
|
||||
"name": "symbol 6",
|
||||
"description": "This is the third item"
|
||||
}
|
||||
]
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Holy Grail Layout with BeerCSS</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
}
|
||||
.container {
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.main-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.main-layout {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
.main-layout {
|
||||
grid-template-columns: 200px 1fr 200px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.main-layout {
|
||||
grid-template-areas:
|
||||
"main"
|
||||
"left-sidebar"
|
||||
"right-sidebar";
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header class="primary padding large">Header</header>
|
||||
<div class="main-layout">
|
||||
<nav class="left-sidebar surface padding">Left Sidebar</nav>
|
||||
<main class="padding">Main Content</main>
|
||||
<aside class="right-sidebar surface padding">Right Sidebar</aside>
|
||||
</div>
|
||||
<footer class="primary padding large">Footer</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -113,7 +113,9 @@
|
|||
<option
|
||||
value="https://git.quodatum.duckdns.org/quodatum/basex-lsp/raw/branch/main/webapp/lsp/lsp-text.xqm">
|
||||
lsp-text.xqm</option>
|
||||
|
||||
<option
|
||||
value="../../../lsp/lsp-text.xqm">
|
||||
lsp-text.xqm</option>
|
||||
</optgroup>
|
||||
<optgroup label="xpath">
|
||||
<option
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue