diff --git a/webapp/lsp/lsp-ws.xqm b/webapp/lsp/lsp-ws.xqm
index 378af2d..86f31c4 100644
--- a/webapp/lsp/lsp-ws.xqm
+++ b/webapp/lsp/lsp-ws.xqm
@@ -17,7 +17,12 @@ function lsp-ws:error($error) {
declare
%ws:connect('/lsp')
function lsp-ws:connect() as empty-sequence() {
-let $id:=(ws:id(),rpc:admin-log("CONNECT","🌹"))
+let $id:=(ws:id(),
+ rpc:admin-log("CoNNECT","🌹"),
+ rpc:admin-log(request:header-map(),"🌹")
+ )
+let $props:=("host","http-version","is-secure","origin","protocol-version","query-string","request-uri","sub-protocols")
+
return (
ws:set($id, "id", $id),
ws:set($id, "connectTime", current-dateTime()),
diff --git a/webapp/lsp/providers/diagnostics.xqm b/webapp/lsp/providers/diagnostics.xqm
index c95a065..8b706d3 100644
--- a/webapp/lsp/providers/diagnostics.xqm
+++ b/webapp/lsp/providers/diagnostics.xqm
@@ -16,14 +16,15 @@ import module namespace pos="lsp/position" at "../position.xqm";
declare type lsp-diags:ParseResult as element(Module|ERROR);
declare variable $lsp-diags:actions as hnd:actionMap :={
- "Module": lsp-diags:Module#2
+ "Module": lsp-diags:Module#2,
+ "ModuleDecl": lsp-diags:ModuleDecl#2
};
declare function lsp-diags:list(
$uri as xs:string,
$text as xs:string,
$xml as lsp-diags:ParseResult)
-as map(*)*{
+as lspt:Diagnostic*{
if($xml/self::ERROR)
then lsp-diags:parse-error($text, $xml)
else lsp-diags:parse-xquery($text,$xml)
@@ -63,9 +64,9 @@ as lspt:Diagnostic*
)
};
-(: test data :)
+(: walk in tree :)
declare function lsp-diags:parse-xquery($text as xs:string, $parse as element(Module))
-as map(*)*{
+as lspt:Diagnostic*{
let $state:= hnd:State((),false(),{"text":$text})
let $state:= hnd:walk($parse,$lsp-diags:actions,$state)
return $state?result
@@ -73,7 +74,7 @@ as map(*)*{
declare function lsp-diags:Module($parse as element(Module),$state as hnd:State )
as hnd:State{
- let $new:=if(exists($parse/VersionDecl)=>trace("has ver: "))
+ let $new:=if(exists($parse/VersionDecl))
then ()
else let $text:=$state?extras?text
@@ -91,4 +92,15 @@ as hnd:State{
,message(name($parse),"Module: ")
)
+};
+
+
+declare function lsp-diags:ModuleDecl($parse as element(ModuleDecl),$state as hnd:State )
+as hnd:State{
+ (: ModuleDecl ::= 'module' 'namespace' NCName '=' URILiteral ';':)
+ let $mod:=$parse/NCName/string()=>trace("pre")
+ let $extras:=$state?extras=>map:put("mod",$mod)
+ return $state
+ =>map:put("extras",$extras)
+ =>map:put("skipchildren",true())
};
\ No newline at end of file
diff --git a/webapp/static/clients/codemirror/grail.css b/webapp/static/clients/codemirror/grail.css
index 78ca593..ee85dc8 100644
--- a/webapp/static/clients/codemirror/grail.css
+++ b/webapp/static/clients/codemirror/grail.css
@@ -5,6 +5,8 @@
--quiet-primary-seed: #e98d61;
--quiet-content-spacing: 0.75rem;
--quiet-form-control-height-md:0.9rem;
+ --quiet-focus-width: 2px;
+ --quiet-focus-offset: 0px;
}
diff --git a/webapp/static/clients/codemirror/grail.html b/webapp/static/clients/codemirror/grail.html
index e7944df..d82db25 100644
--- a/webapp/static/clients/codemirror/grail.html
+++ b/webapp/static/clients/codemirror/grail.html
@@ -10,34 +10,36 @@
-
-
-
-
-
+
-
+