diff --git a/webapp/lsp/lsp-ws.xqm b/webapp/lsp/lsp-ws.xqm index 86f31c4..378af2d 100644 --- a/webapp/lsp/lsp-ws.xqm +++ b/webapp/lsp/lsp-ws.xqm @@ -17,12 +17,7 @@ function lsp-ws:error($error) { declare %ws:connect('/lsp') function lsp-ws:connect() as empty-sequence() { -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") - +let $id:=(ws:id(),rpc:admin-log("CONNECT","🌹")) 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 8b706d3..c95a065 100644 --- a/webapp/lsp/providers/diagnostics.xqm +++ b/webapp/lsp/providers/diagnostics.xqm @@ -16,15 +16,14 @@ 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, - "ModuleDecl": lsp-diags:ModuleDecl#2 + "Module": lsp-diags:Module#2 }; declare function lsp-diags:list( $uri as xs:string, $text as xs:string, $xml as lsp-diags:ParseResult) -as lspt:Diagnostic*{ +as map(*)*{ if($xml/self::ERROR) then lsp-diags:parse-error($text, $xml) else lsp-diags:parse-xquery($text,$xml) @@ -64,9 +63,9 @@ as lspt:Diagnostic* ) }; -(: walk in tree :) +(: test data :) declare function lsp-diags:parse-xquery($text as xs:string, $parse as element(Module)) -as lspt:Diagnostic*{ +as map(*)*{ let $state:= hnd:State((),false(),{"text":$text}) let $state:= hnd:walk($parse,$lsp-diags:actions,$state) return $state?result @@ -74,7 +73,7 @@ as lspt:Diagnostic*{ declare function lsp-diags:Module($parse as element(Module),$state as hnd:State ) as hnd:State{ - let $new:=if(exists($parse/VersionDecl)) + let $new:=if(exists($parse/VersionDecl)=>trace("has ver: ")) then () else let $text:=$state?extras?text @@ -92,15 +91,4 @@ 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 ee85dc8..78ca593 100644 --- a/webapp/static/clients/codemirror/grail.css +++ b/webapp/static/clients/codemirror/grail.css @@ -5,8 +5,6 @@ --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 d82db25..e7944df 100644 --- a/webapp/static/clients/codemirror/grail.html +++ b/webapp/static/clients/codemirror/grail.html @@ -10,36 +10,34 @@ + + + - + +
- +