[mod] better completion info
This commit is contained in:
parent
a2fa9cb062
commit
9894581d19
6 changed files with 43 additions and 19 deletions
|
|
@ -10,10 +10,14 @@ as lspt:CompletionItem*{
|
|||
|
||||
declare function comp:dummy($context as map(*))
|
||||
as lspt:CompletionItem*{
|
||||
|
||||
message($context,"context: "),
|
||||
map:for-each($lspt:CompletionItemKindMap,
|
||||
fn($k,$v){
|
||||
lspt:CompletionItem($k,$v)
|
||||
})
|
||||
message($context,"context: "),
|
||||
map:for-each(
|
||||
$lspt:CompletionItemKindMap,
|
||||
fn($k,$v){
|
||||
let $d:=lspt:MarkupContent(
|
||||
'markdown',
|
||||
'[path](https://quodatum.github.io/basex-xqparse/i-BaseX.xhtml#EQName)'
|
||||
)
|
||||
return lspt:CompletionItem($k,$v,detail:="detail",documentation:=$d)
|
||||
})
|
||||
};
|
||||
12
webapp/lsp/providers/hover.xqm
Normal file
12
webapp/lsp/providers/hover.xqm
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
module namespace hov = 'lsp-hover';
|
||||
import module namespace lspt = 'lsp-typedefs' at "../lsp-typedefs.xqm";
|
||||
import module namespace pos="lsp/position" at "../position.xqm";
|
||||
|
||||
declare function hov:list($uri, $pos as map(*))
|
||||
as xs:string*{
|
||||
let $word:="TODO"
|
||||
return `Hover { pos:ln-col($pos) }, uri: {$uri},
|
||||
[path](https://quodatum.github.io/basex-xqparse/i-BaseX.xhtml#EQName)
|
||||
|
||||
WordAt: {$word}`
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue