diff --git a/webapp/lsp/jsonrpc.xqm b/webapp/lsp/jsonrpc.xqm index b69e822..f673186 100644 --- a/webapp/lsp/jsonrpc.xqm +++ b/webapp/lsp/jsonrpc.xqm @@ -70,7 +70,8 @@ declare function rpc:send($msg as map(*)) as empty-sequence() { - rpc:admin-log($msg,"⬅️"),ws:send($msg ,ws:id()) + rpc:admin-log($msg,"⬅️"), + ws:send($msg ,ws:id()) }; (:~ canned initialize response :) diff --git a/webapp/lsp/position.xqm b/webapp/lsp/position.xqm index 303f8fe..b278f0c 100644 --- a/webapp/lsp/position.xqm +++ b/webapp/lsp/position.xqm @@ -84,3 +84,14 @@ declare function pos:full-range($text as xs:string) as lspt:Range{ lspt:Range(pos:toPosition($text,0), pos:toPosition($text, string-length($text))) }; + +(:~ range for $text from indices:) +declare function pos:range-from-ast( + $text as xs:string, +$ast as element(*)) +as lspt:Range{ + lspt:Range( + pos:toPosition($text,number($ast/@start)), + pos:toPosition($text, number($ast/@end)) + ) +}; diff --git a/webapp/static/clients/codemirror/grail.html b/webapp/static/clients/codemirror/grail.html index 9b74b73..d815632 100644 --- a/webapp/static/clients/codemirror/grail.html +++ b/webapp/static/clients/codemirror/grail.html @@ -1,5 +1,5 @@ - +
@@ -8,8 +8,14 @@ - - + + + + + + @@ -27,7 +33,7 @@