[add] symbol wc

This commit is contained in:
Andy Bunce 2025-09-21 18:00:51 +01:00
parent aede6dab36
commit 2a3e962c58
6 changed files with 138 additions and 7 deletions

View file

@ -15,7 +15,7 @@ declare variable $lsp-text:methods:=map{
"textDocument/hover": lsp-text:hover#1,
"textDocument/completion": lsp-text:completion#1,
"textDocument/formatting" : lsp-text:format#1,
"textDocument/documentSymbol" : lsp-text:symbols#1
"textDocument/documentSymbol" : lsp-text:symbols#1
};
(:~ hover :)
@ -35,7 +35,8 @@ declare
function lsp-text:symbols($json as map(*))
as map(*)?
{
let $doc:=$json?params?textDocument?uri
let $uri:=$json?params?textDocument?uri
let $text:=docs:get(ws:id(), $uri, "textDocument")?text
return map{
"jsonrpc": "2.0",
"id": $json?id,